{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/root/anaconda3/lib/python3.5/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.\n",
      "  from ._conv import register_converters as _register_converters\n",
      "Using TensorFlow backend.\n"
     ]
    }
   ],
   "source": [
    "from keras.preprocessing.text import one_hot\n",
    "from keras.preprocessing.sequence import pad_sequences\n",
    "from keras.models import Sequential\n",
    "from keras.layers import Dense\n",
    "from keras.layers import Flatten\n",
    "from keras.layers.recurrent import SimpleRNN\n",
    "from keras.layers.embeddings import Embedding\n",
    "from keras.layers import LSTM\n",
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# define documents\n",
    "docs = ['very good',\n",
    "\t\t'very bad']\n",
    "# define class labels\n",
    "labels = [1,0]\n",
    "from collections import Counter\n",
    "counts = Counter()\n",
    "for i,review in enumerate(docs):\n",
    "    counts.update(review.split())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "words = sorted(counts, key=counts.get, reverse=True)\n",
    "vocab_size=len(words)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "word_to_int = {word: i for i, word in enumerate(words, 1)}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "encoded_docs = []\n",
    "for doc in docs:\n",
    "    encoded_docs.append([word_to_int[word] for word in doc.split()])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[[1, 3], [1, 2]]"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "encoded_docs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[1 3]\n",
      " [1 2]]\n"
     ]
    }
   ],
   "source": [
    "# pad documents to a max length of 2 words\n",
    "max_length = 2\n",
    "padded_docs = pad_sequences(encoded_docs, maxlen=max_length, padding='pre')\n",
    "print(padded_docs)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "_________________________________________________________________\n",
      "Layer (type)                 Output Shape              Param #   \n",
      "=================================================================\n",
      "simple_rnn_1 (SimpleRNN)     (None, 1)                 3         \n",
      "_________________________________________________________________\n",
      "dense_1 (Dense)              (None, 1)                 2         \n",
      "=================================================================\n",
      "Total params: 5\n",
      "Trainable params: 5\n",
      "Non-trainable params: 0\n",
      "_________________________________________________________________\n",
      "None\n"
     ]
    }
   ],
   "source": [
    "model = Sequential()\n",
    "model.add(SimpleRNN(1,activation='tanh', return_sequences=False,input_shape=(2,1),unroll=True))\n",
    "model.add(Dense(1, activation='sigmoid'))\n",
    "# compile the model\n",
    "model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['acc'])\n",
    "# summarize the model\n",
    "print(model.summary())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "_________________________________________________________________\n",
      "Layer (type)                 Output Shape              Param #   \n",
      "=================================================================\n",
      "simple_rnn_2 (SimpleRNN)     (None, 1)                 3         \n",
      "_________________________________________________________________\n",
      "dense_2 (Dense)              (None, 1)                 2         \n",
      "=================================================================\n",
      "Total params: 5\n",
      "Trainable params: 5\n",
      "Non-trainable params: 0\n",
      "_________________________________________________________________\n",
      "None\n"
     ]
    }
   ],
   "source": [
    "# define the model\n",
    "embed_length=1\n",
    "model = Sequential()\n",
    "#model.add(Embedding(vocab_size, embed_length, input_length=max_length))\n",
    "model.add(SimpleRNN(1,activation='tanh', return_sequences=False,recurrent_initializer='Zeros',input_shape=(max_length,embed_length),unroll=True))\n",
    "#model.add(Flatten())\n",
    "model.add(Dense(1, activation='sigmoid'))\n",
    "#model.add(Dense(1, activation='sigmoid'))\n",
    "# compile the model\n",
    "model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['acc'])\n",
    "# summarize the model\n",
    "print(model.summary())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch 1/500\n",
      "2/2 [==============================] - 0s 245ms/step - loss: 0.7276 - acc: 0.5000\n",
      "Epoch 2/500\n",
      "2/2 [==============================] - 0s 805us/step - loss: 0.7273 - acc: 0.5000\n",
      "Epoch 3/500\n",
      "2/2 [==============================] - 0s 579us/step - loss: 0.7270 - acc: 0.5000\n",
      "Epoch 4/500\n",
      "2/2 [==============================] - 0s 738us/step - loss: 0.7268 - acc: 0.5000\n",
      "Epoch 5/500\n",
      "2/2 [==============================] - 0s 647us/step - loss: 0.7265 - acc: 0.5000\n",
      "Epoch 6/500\n",
      "2/2 [==============================] - 0s 644us/step - loss: 0.7262 - acc: 0.5000\n",
      "Epoch 7/500\n",
      "2/2 [==============================] - 0s 566us/step - loss: 0.7259 - acc: 0.5000\n",
      "Epoch 8/500\n",
      "2/2 [==============================] - 0s 656us/step - loss: 0.7257 - acc: 0.5000\n",
      "Epoch 9/500\n",
      "2/2 [==============================] - 0s 655us/step - loss: 0.7254 - acc: 0.5000\n",
      "Epoch 10/500\n",
      "2/2 [==============================] - 0s 682us/step - loss: 0.7251 - acc: 0.5000\n",
      "Epoch 11/500\n",
      "2/2 [==============================] - 0s 650us/step - loss: 0.7249 - acc: 0.5000\n",
      "Epoch 12/500\n",
      "2/2 [==============================] - 0s 627us/step - loss: 0.7246 - acc: 0.5000\n",
      "Epoch 13/500\n",
      "2/2 [==============================] - 0s 557us/step - loss: 0.7243 - acc: 0.5000\n",
      "Epoch 14/500\n",
      "2/2 [==============================] - 0s 687us/step - loss: 0.7241 - acc: 0.5000\n",
      "Epoch 15/500\n",
      "2/2 [==============================] - 0s 650us/step - loss: 0.7238 - acc: 0.5000\n",
      "Epoch 16/500\n",
      "2/2 [==============================] - 0s 589us/step - loss: 0.7235 - acc: 0.5000\n",
      "Epoch 17/500\n",
      "2/2 [==============================] - 0s 648us/step - loss: 0.7233 - acc: 0.5000\n",
      "Epoch 18/500\n",
      "2/2 [==============================] - 0s 675us/step - loss: 0.7230 - acc: 0.5000\n",
      "Epoch 19/500\n",
      "2/2 [==============================] - 0s 619us/step - loss: 0.7228 - acc: 0.5000\n",
      "Epoch 20/500\n",
      "2/2 [==============================] - 0s 612us/step - loss: 0.7225 - acc: 0.5000\n",
      "Epoch 21/500\n",
      "2/2 [==============================] - 0s 609us/step - loss: 0.7223 - acc: 0.5000\n",
      "Epoch 22/500\n",
      "2/2 [==============================] - 0s 666us/step - loss: 0.7220 - acc: 0.5000\n",
      "Epoch 23/500\n",
      "2/2 [==============================] - 0s 591us/step - loss: 0.7217 - acc: 0.5000\n",
      "Epoch 24/500\n",
      "2/2 [==============================] - 0s 672us/step - loss: 0.7215 - acc: 0.5000\n",
      "Epoch 25/500\n",
      "2/2 [==============================] - 0s 666us/step - loss: 0.7212 - acc: 0.5000\n",
      "Epoch 26/500\n",
      "2/2 [==============================] - 0s 616us/step - loss: 0.7210 - acc: 0.5000\n",
      "Epoch 27/500\n",
      "2/2 [==============================] - 0s 557us/step - loss: 0.7207 - acc: 0.5000\n",
      "Epoch 28/500\n",
      "2/2 [==============================] - 0s 585us/step - loss: 0.7205 - acc: 0.5000\n",
      "Epoch 29/500\n",
      "2/2 [==============================] - 0s 588us/step - loss: 0.7203 - acc: 0.5000\n",
      "Epoch 30/500\n",
      "2/2 [==============================] - 0s 642us/step - loss: 0.7200 - acc: 0.5000\n",
      "Epoch 31/500\n",
      "2/2 [==============================] - 0s 607us/step - loss: 0.7198 - acc: 0.5000\n",
      "Epoch 32/500\n",
      "2/2 [==============================] - 0s 598us/step - loss: 0.7195 - acc: 0.5000\n",
      "Epoch 33/500\n",
      "2/2 [==============================] - 0s 583us/step - loss: 0.7193 - acc: 0.5000\n",
      "Epoch 34/500\n",
      "2/2 [==============================] - 0s 582us/step - loss: 0.7190 - acc: 0.5000\n",
      "Epoch 35/500\n",
      "2/2 [==============================] - 0s 621us/step - loss: 0.7188 - acc: 0.5000\n",
      "Epoch 36/500\n",
      "2/2 [==============================] - 0s 619us/step - loss: 0.7186 - acc: 0.5000\n",
      "Epoch 37/500\n",
      "2/2 [==============================] - 0s 584us/step - loss: 0.7183 - acc: 0.5000\n",
      "Epoch 38/500\n",
      "2/2 [==============================] - 0s 634us/step - loss: 0.7181 - acc: 0.5000\n",
      "Epoch 39/500\n",
      "2/2 [==============================] - 0s 600us/step - loss: 0.7179 - acc: 0.5000\n",
      "Epoch 40/500\n",
      "2/2 [==============================] - 0s 606us/step - loss: 0.7176 - acc: 0.5000\n",
      "Epoch 41/500\n",
      "2/2 [==============================] - 0s 666us/step - loss: 0.7174 - acc: 0.5000\n",
      "Epoch 42/500\n",
      "2/2 [==============================] - 0s 566us/step - loss: 0.7172 - acc: 0.5000\n",
      "Epoch 43/500\n",
      "2/2 [==============================] - 0s 607us/step - loss: 0.7169 - acc: 0.5000\n",
      "Epoch 44/500\n",
      "2/2 [==============================] - 0s 664us/step - loss: 0.7167 - acc: 0.5000\n",
      "Epoch 45/500\n",
      "2/2 [==============================] - 0s 582us/step - loss: 0.7165 - acc: 0.5000\n",
      "Epoch 46/500\n",
      "2/2 [==============================] - 0s 589us/step - loss: 0.7162 - acc: 0.5000\n",
      "Epoch 47/500\n",
      "2/2 [==============================] - 0s 576us/step - loss: 0.7160 - acc: 0.5000\n",
      "Epoch 48/500\n",
      "2/2 [==============================] - 0s 670us/step - loss: 0.7158 - acc: 0.5000\n",
      "Epoch 49/500\n",
      "2/2 [==============================] - 0s 673us/step - loss: 0.7156 - acc: 0.5000\n",
      "Epoch 50/500\n",
      "2/2 [==============================] - 0s 626us/step - loss: 0.7154 - acc: 0.5000\n",
      "Epoch 51/500\n",
      "2/2 [==============================] - 0s 668us/step - loss: 0.7151 - acc: 0.5000\n",
      "Epoch 52/500\n",
      "2/2 [==============================] - 0s 636us/step - loss: 0.7149 - acc: 0.5000\n",
      "Epoch 53/500\n",
      "2/2 [==============================] - 0s 667us/step - loss: 0.7147 - acc: 0.5000\n",
      "Epoch 54/500\n",
      "2/2 [==============================] - 0s 637us/step - loss: 0.7145 - acc: 0.5000\n",
      "Epoch 55/500\n",
      "2/2 [==============================] - 0s 590us/step - loss: 0.7143 - acc: 0.5000\n",
      "Epoch 56/500\n",
      "2/2 [==============================] - 0s 580us/step - loss: 0.7141 - acc: 0.5000\n",
      "Epoch 57/500\n",
      "2/2 [==============================] - 0s 621us/step - loss: 0.7138 - acc: 0.5000\n",
      "Epoch 58/500\n",
      "2/2 [==============================] - 0s 605us/step - loss: 0.7136 - acc: 0.5000\n",
      "Epoch 59/500\n",
      "2/2 [==============================] - 0s 651us/step - loss: 0.7134 - acc: 0.5000\n",
      "Epoch 60/500\n",
      "2/2 [==============================] - 0s 671us/step - loss: 0.7132 - acc: 0.5000\n",
      "Epoch 61/500\n",
      "2/2 [==============================] - 0s 648us/step - loss: 0.7130 - acc: 0.5000\n",
      "Epoch 62/500\n",
      "2/2 [==============================] - 0s 598us/step - loss: 0.7128 - acc: 0.5000\n",
      "Epoch 63/500\n",
      "2/2 [==============================] - 0s 621us/step - loss: 0.7126 - acc: 0.5000\n",
      "Epoch 64/500\n",
      "2/2 [==============================] - 0s 589us/step - loss: 0.7124 - acc: 0.5000\n",
      "Epoch 65/500\n",
      "2/2 [==============================] - 0s 633us/step - loss: 0.7122 - acc: 0.5000\n",
      "Epoch 66/500\n",
      "2/2 [==============================] - 0s 642us/step - loss: 0.7120 - acc: 0.5000\n",
      "Epoch 67/500\n",
      "2/2 [==============================] - 0s 636us/step - loss: 0.7118 - acc: 0.5000\n",
      "Epoch 68/500\n",
      "2/2 [==============================] - 0s 603us/step - loss: 0.7116 - acc: 0.5000\n",
      "Epoch 69/500\n",
      "2/2 [==============================] - 0s 603us/step - loss: 0.7114 - acc: 0.5000\n",
      "Epoch 70/500\n",
      "2/2 [==============================] - 0s 672us/step - loss: 0.7112 - acc: 0.5000\n",
      "Epoch 71/500\n",
      "2/2 [==============================] - 0s 586us/step - loss: 0.7110 - acc: 0.5000\n",
      "Epoch 72/500\n",
      "2/2 [==============================] - 0s 588us/step - loss: 0.7108 - acc: 0.5000\n",
      "Epoch 73/500\n",
      "2/2 [==============================] - 0s 623us/step - loss: 0.7106 - acc: 0.5000\n",
      "Epoch 74/500\n",
      "2/2 [==============================] - 0s 595us/step - loss: 0.7104 - acc: 0.5000\n",
      "Epoch 75/500\n",
      "2/2 [==============================] - 0s 606us/step - loss: 0.7102 - acc: 0.5000\n",
      "Epoch 76/500\n",
      "2/2 [==============================] - 0s 626us/step - loss: 0.7100 - acc: 0.5000\n",
      "Epoch 77/500\n",
      "2/2 [==============================] - 0s 613us/step - loss: 0.7098 - acc: 0.5000\n",
      "Epoch 78/500\n",
      "2/2 [==============================] - 0s 671us/step - loss: 0.7096 - acc: 0.5000\n",
      "Epoch 79/500\n",
      "2/2 [==============================] - 0s 672us/step - loss: 0.7094 - acc: 0.5000\n",
      "Epoch 80/500\n",
      "2/2 [==============================] - 0s 639us/step - loss: 0.7093 - acc: 0.5000\n",
      "Epoch 81/500\n",
      "2/2 [==============================] - 0s 589us/step - loss: 0.7091 - acc: 0.5000\n",
      "Epoch 82/500\n",
      "2/2 [==============================] - 0s 651us/step - loss: 0.7089 - acc: 0.5000\n",
      "Epoch 83/500\n",
      "2/2 [==============================] - 0s 634us/step - loss: 0.7087 - acc: 0.5000\n",
      "Epoch 84/500\n",
      "2/2 [==============================] - 0s 633us/step - loss: 0.7085 - acc: 0.5000\n",
      "Epoch 85/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7083 - acc: 0.5000\n",
      "Epoch 86/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7082 - acc: 0.5000\n",
      "Epoch 87/500\n",
      "2/2 [==============================] - 0s 628us/step - loss: 0.7080 - acc: 0.5000\n",
      "Epoch 88/500\n",
      "2/2 [==============================] - 0s 658us/step - loss: 0.7078 - acc: 0.5000\n",
      "Epoch 89/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7076 - acc: 0.5000\n",
      "Epoch 90/500\n",
      "2/2 [==============================] - 0s 597us/step - loss: 0.7074 - acc: 0.5000\n",
      "Epoch 91/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7073 - acc: 0.5000\n",
      "Epoch 92/500\n",
      "2/2 [==============================] - 0s 580us/step - loss: 0.7071 - acc: 0.5000\n",
      "Epoch 93/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7069 - acc: 0.5000\n",
      "Epoch 94/500\n",
      "2/2 [==============================] - 0s 628us/step - loss: 0.7067 - acc: 0.5000\n",
      "Epoch 95/500\n",
      "2/2 [==============================] - 0s 658us/step - loss: 0.7066 - acc: 0.5000\n",
      "Epoch 96/500\n",
      "2/2 [==============================] - 0s 643us/step - loss: 0.7064 - acc: 0.5000\n",
      "Epoch 97/500\n",
      "2/2 [==============================] - 0s 619us/step - loss: 0.7062 - acc: 0.5000\n",
      "Epoch 98/500\n",
      "2/2 [==============================] - 0s 606us/step - loss: 0.7061 - acc: 0.5000\n",
      "Epoch 99/500\n",
      "2/2 [==============================] - 0s 738us/step - loss: 0.7059 - acc: 0.5000\n",
      "Epoch 100/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7057 - acc: 0.5000\n",
      "Epoch 101/500\n",
      "2/2 [==============================] - 0s 644us/step - loss: 0.7056 - acc: 0.5000\n",
      "Epoch 102/500\n",
      "2/2 [==============================] - 0s 649us/step - loss: 0.7054 - acc: 0.5000\n",
      "Epoch 103/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7052 - acc: 0.5000\n",
      "Epoch 104/500\n",
      "2/2 [==============================] - 0s 591us/step - loss: 0.7051 - acc: 0.5000\n",
      "Epoch 105/500\n",
      "2/2 [==============================] - 0s 611us/step - loss: 0.7049 - acc: 0.5000\n",
      "Epoch 106/500\n",
      "2/2 [==============================] - 0s 576us/step - loss: 0.7047 - acc: 0.5000\n",
      "Epoch 107/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7046 - acc: 0.5000\n",
      "Epoch 108/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7044 - acc: 0.5000\n",
      "Epoch 109/500\n",
      "2/2 [==============================] - 0s 697us/step - loss: 0.7043 - acc: 0.5000\n",
      "Epoch 110/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7041 - acc: 0.5000\n",
      "Epoch 111/500\n",
      "2/2 [==============================] - 0s 577us/step - loss: 0.7039 - acc: 0.5000\n",
      "Epoch 112/500\n",
      "2/2 [==============================] - 0s 588us/step - loss: 0.7038 - acc: 0.5000\n",
      "Epoch 113/500\n",
      "2/2 [==============================] - 0s 630us/step - loss: 0.7036 - acc: 0.5000\n",
      "Epoch 114/500\n",
      "2/2 [==============================] - 0s 612us/step - loss: 0.7035 - acc: 0.5000\n",
      "Epoch 115/500\n",
      "2/2 [==============================] - 0s 633us/step - loss: 0.7033 - acc: 0.5000\n",
      "Epoch 116/500\n",
      "2/2 [==============================] - 0s 600us/step - loss: 0.7032 - acc: 0.5000\n",
      "Epoch 117/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7030 - acc: 0.5000\n",
      "Epoch 118/500\n",
      "2/2 [==============================] - 0s 669us/step - loss: 0.7029 - acc: 0.5000\n",
      "Epoch 119/500\n",
      "2/2 [==============================] - 0s 608us/step - loss: 0.7027 - acc: 0.5000\n",
      "Epoch 120/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7026 - acc: 0.5000\n",
      "Epoch 121/500\n",
      "2/2 [==============================] - 0s 607us/step - loss: 0.7024 - acc: 0.5000\n",
      "Epoch 122/500\n",
      "2/2 [==============================] - 0s 581us/step - loss: 0.7023 - acc: 0.5000\n",
      "Epoch 123/500\n",
      "2/2 [==============================] - 0s 577us/step - loss: 0.7021 - acc: 0.5000\n",
      "Epoch 124/500\n",
      "2/2 [==============================] - 0s 561us/step - loss: 0.7020 - acc: 0.5000\n",
      "Epoch 125/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7018 - acc: 0.5000\n",
      "Epoch 126/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7017 - acc: 0.5000\n",
      "Epoch 127/500\n",
      "2/2 [==============================] - 0s 631us/step - loss: 0.7015 - acc: 0.5000\n",
      "Epoch 128/500\n",
      "2/2 [==============================] - 0s 582us/step - loss: 0.7014 - acc: 0.5000\n",
      "Epoch 129/500\n",
      "2/2 [==============================] - 0s 567us/step - loss: 0.7012 - acc: 0.5000\n",
      "Epoch 130/500\n",
      "2/2 [==============================] - 0s 619us/step - loss: 0.7011 - acc: 0.5000\n",
      "Epoch 131/500\n",
      "2/2 [==============================] - 0s 643us/step - loss: 0.7009 - acc: 0.5000\n",
      "Epoch 132/500\n",
      "2/2 [==============================] - 0s 528us/step - loss: 0.7008 - acc: 0.5000\n",
      "Epoch 133/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7007 - acc: 0.5000\n",
      "Epoch 134/500\n",
      "2/2 [==============================] - 0s 663us/step - loss: 0.7005 - acc: 0.5000\n",
      "Epoch 135/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7004 - acc: 0.5000\n",
      "Epoch 136/500\n",
      "2/2 [==============================] - 0s 625us/step - loss: 0.7002 - acc: 0.5000\n",
      "Epoch 137/500\n",
      "2/2 [==============================] - 0s 619us/step - loss: 0.7001 - acc: 0.5000\n",
      "Epoch 138/500\n",
      "2/2 [==============================] - 0s 604us/step - loss: 0.7000 - acc: 0.5000\n",
      "Epoch 139/500\n",
      "2/2 [==============================] - 0s 568us/step - loss: 0.6998 - acc: 0.5000\n",
      "Epoch 140/500\n",
      "2/2 [==============================] - 0s 559us/step - loss: 0.6997 - acc: 0.5000\n",
      "Epoch 141/500\n",
      "2/2 [==============================] - 0s 602us/step - loss: 0.6996 - acc: 0.5000\n",
      "Epoch 142/500\n",
      "2/2 [==============================] - 0s 615us/step - loss: 0.6994 - acc: 0.5000\n",
      "Epoch 143/500\n",
      "2/2 [==============================] - 0s 636us/step - loss: 0.6993 - acc: 0.5000\n",
      "Epoch 144/500\n",
      "2/2 [==============================] - 0s 606us/step - loss: 0.6992 - acc: 0.5000\n",
      "Epoch 145/500\n",
      "2/2 [==============================] - 0s 631us/step - loss: 0.6990 - acc: 0.5000\n",
      "Epoch 146/500\n",
      "2/2 [==============================] - 0s 627us/step - loss: 0.6989 - acc: 0.5000\n",
      "Epoch 147/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6988 - acc: 0.5000\n",
      "Epoch 148/500\n",
      "2/2 [==============================] - 0s 566us/step - loss: 0.6986 - acc: 0.5000\n",
      "Epoch 149/500\n",
      "2/2 [==============================] - 0s 567us/step - loss: 0.6985 - acc: 0.5000\n",
      "Epoch 150/500\n",
      "2/2 [==============================] - 0s 550us/step - loss: 0.6984 - acc: 0.5000\n",
      "Epoch 151/500\n",
      "2/2 [==============================] - 0s 619us/step - loss: 0.6982 - acc: 0.5000\n",
      "Epoch 152/500\n",
      "2/2 [==============================] - 0s 578us/step - loss: 0.6981 - acc: 0.5000\n",
      "Epoch 153/500\n",
      "2/2 [==============================] - 0s 546us/step - loss: 0.6980 - acc: 0.5000\n",
      "Epoch 154/500\n",
      "2/2 [==============================] - 0s 621us/step - loss: 0.6979 - acc: 0.5000\n",
      "Epoch 155/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6977 - acc: 0.5000\n",
      "Epoch 156/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6976 - acc: 0.5000\n",
      "Epoch 157/500\n",
      "2/2 [==============================] - 0s 2ms/step - loss: 0.6975 - acc: 0.5000\n",
      "Epoch 158/500\n",
      "2/2 [==============================] - 0s 588us/step - loss: 0.6974 - acc: 0.5000\n",
      "Epoch 159/500\n",
      "2/2 [==============================] - 0s 995us/step - loss: 0.6972 - acc: 0.5000\n",
      "Epoch 160/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6971 - acc: 0.5000\n",
      "Epoch 161/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6970 - acc: 0.5000\n",
      "Epoch 162/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6969 - acc: 0.5000\n",
      "Epoch 163/500\n",
      "2/2 [==============================] - 0s 550us/step - loss: 0.6967 - acc: 0.5000\n",
      "Epoch 164/500\n",
      "2/2 [==============================] - 0s 917us/step - loss: 0.6966 - acc: 0.5000\n",
      "Epoch 165/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6965 - acc: 0.5000\n",
      "Epoch 166/500\n",
      "2/2 [==============================] - 0s 939us/step - loss: 0.6964 - acc: 0.5000\n",
      "Epoch 167/500\n",
      "2/2 [==============================] - 0s 663us/step - loss: 0.6963 - acc: 0.5000\n",
      "Epoch 168/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6961 - acc: 0.5000\n",
      "Epoch 169/500\n",
      "2/2 [==============================] - 0s 951us/step - loss: 0.6960 - acc: 0.5000\n",
      "Epoch 170/500\n",
      "2/2 [==============================] - 0s 950us/step - loss: 0.6959 - acc: 0.5000\n",
      "Epoch 171/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6958 - acc: 0.5000\n",
      "Epoch 172/500\n",
      "2/2 [==============================] - 0s 939us/step - loss: 0.6957 - acc: 0.5000\n",
      "Epoch 173/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6955 - acc: 0.5000\n",
      "Epoch 174/500\n",
      "2/2 [==============================] - 0s 612us/step - loss: 0.6954 - acc: 0.5000\n",
      "Epoch 175/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6953 - acc: 0.5000\n",
      "Epoch 176/500\n",
      "2/2 [==============================] - 0s 650us/step - loss: 0.6952 - acc: 0.5000\n",
      "Epoch 177/500\n",
      "2/2 [==============================] - 0s 580us/step - loss: 0.6951 - acc: 0.5000\n",
      "Epoch 178/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6950 - acc: 0.5000\n",
      "Epoch 179/500\n",
      "2/2 [==============================] - 0s 563us/step - loss: 0.6949 - acc: 0.5000\n",
      "Epoch 180/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6947 - acc: 0.5000\n",
      "Epoch 181/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6946 - acc: 0.5000\n",
      "Epoch 182/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6945 - acc: 0.5000\n",
      "Epoch 183/500\n",
      "2/2 [==============================] - 0s 605us/step - loss: 0.6944 - acc: 0.5000\n",
      "Epoch 184/500\n",
      "2/2 [==============================] - 0s 615us/step - loss: 0.6943 - acc: 0.5000\n",
      "Epoch 185/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6942 - acc: 0.5000\n",
      "Epoch 186/500\n",
      "2/2 [==============================] - 0s 953us/step - loss: 0.6941 - acc: 0.5000\n",
      "Epoch 187/500\n",
      "2/2 [==============================] - 0s 591us/step - loss: 0.6939 - acc: 0.5000\n",
      "Epoch 188/500\n",
      "2/2 [==============================] - 0s 590us/step - loss: 0.6938 - acc: 0.5000\n",
      "Epoch 189/500\n",
      "2/2 [==============================] - 0s 579us/step - loss: 0.6937 - acc: 0.5000\n",
      "Epoch 190/500\n",
      "2/2 [==============================] - 0s 592us/step - loss: 0.6936 - acc: 0.5000\n",
      "Epoch 191/500\n",
      "2/2 [==============================] - 0s 618us/step - loss: 0.6935 - acc: 0.5000\n",
      "Epoch 192/500\n",
      "2/2 [==============================] - 0s 622us/step - loss: 0.6934 - acc: 0.5000\n",
      "Epoch 193/500\n",
      "2/2 [==============================] - 0s 664us/step - loss: 0.6933 - acc: 0.5000\n",
      "Epoch 194/500\n",
      "2/2 [==============================] - 0s 583us/step - loss: 0.6932 - acc: 0.5000\n",
      "Epoch 195/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6931 - acc: 0.5000\n",
      "Epoch 196/500\n",
      "2/2 [==============================] - 0s 639us/step - loss: 0.6929 - acc: 0.5000\n",
      "Epoch 197/500\n",
      "2/2 [==============================] - 0s 2ms/step - loss: 0.6928 - acc: 0.5000\n",
      "Epoch 198/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6927 - acc: 0.5000\n",
      "Epoch 199/500\n",
      "2/2 [==============================] - 0s 539us/step - loss: 0.6926 - acc: 0.5000\n",
      "Epoch 200/500\n",
      "2/2 [==============================] - 0s 924us/step - loss: 0.6925 - acc: 0.5000\n",
      "Epoch 201/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6924 - acc: 0.5000\n",
      "Epoch 202/500\n",
      "2/2 [==============================] - 0s 911us/step - loss: 0.6923 - acc: 0.5000\n",
      "Epoch 203/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6922 - acc: 0.5000\n",
      "Epoch 204/500\n",
      "2/2 [==============================] - 0s 631us/step - loss: 0.6921 - acc: 0.5000\n",
      "Epoch 205/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6920 - acc: 0.5000\n",
      "Epoch 206/500\n",
      "2/2 [==============================] - 0s 953us/step - loss: 0.6919 - acc: 0.5000\n",
      "Epoch 207/500\n",
      "2/2 [==============================] - 0s 568us/step - loss: 0.6918 - acc: 0.5000\n",
      "Epoch 208/500\n",
      "2/2 [==============================] - 0s 653us/step - loss: 0.6916 - acc: 0.5000\n",
      "Epoch 209/500\n",
      "2/2 [==============================] - 0s 616us/step - loss: 0.6915 - acc: 0.5000\n",
      "Epoch 210/500\n",
      "2/2 [==============================] - 0s 605us/step - loss: 0.6914 - acc: 0.5000\n",
      "Epoch 211/500\n",
      "2/2 [==============================] - 0s 578us/step - loss: 0.6913 - acc: 0.5000\n",
      "Epoch 212/500\n",
      "2/2 [==============================] - 0s 630us/step - loss: 0.6912 - acc: 0.5000\n",
      "Epoch 213/500\n",
      "2/2 [==============================] - 0s 658us/step - loss: 0.6911 - acc: 0.5000\n",
      "Epoch 214/500\n",
      "2/2 [==============================] - 0s 619us/step - loss: 0.6910 - acc: 0.5000\n",
      "Epoch 215/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6909 - acc: 0.5000\n",
      "Epoch 216/500\n",
      "2/2 [==============================] - 0s 647us/step - loss: 0.6908 - acc: 0.5000\n",
      "Epoch 217/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6907 - acc: 0.5000\n",
      "Epoch 218/500\n",
      "2/2 [==============================] - 0s 596us/step - loss: 0.6906 - acc: 0.5000\n",
      "Epoch 219/500\n",
      "2/2 [==============================] - 0s 639us/step - loss: 0.6905 - acc: 0.5000\n",
      "Epoch 220/500\n",
      "2/2 [==============================] - 0s 639us/step - loss: 0.6904 - acc: 0.5000\n",
      "Epoch 221/500\n",
      "2/2 [==============================] - 0s 621us/step - loss: 0.6903 - acc: 0.5000\n",
      "Epoch 222/500\n",
      "2/2 [==============================] - 0s 614us/step - loss: 0.6902 - acc: 0.5000\n",
      "Epoch 223/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6901 - acc: 0.5000\n",
      "Epoch 224/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6900 - acc: 0.5000\n",
      "Epoch 225/500\n",
      "2/2 [==============================] - 0s 603us/step - loss: 0.6898 - acc: 0.5000\n",
      "Epoch 226/500\n",
      "2/2 [==============================] - 0s 990us/step - loss: 0.6897 - acc: 0.5000\n",
      "Epoch 227/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6896 - acc: 0.5000\n",
      "Epoch 228/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6895 - acc: 0.5000\n",
      "Epoch 229/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6894 - acc: 0.5000\n",
      "Epoch 230/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6893 - acc: 0.5000\n",
      "Epoch 231/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6892 - acc: 0.5000\n",
      "Epoch 232/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6891 - acc: 0.5000\n",
      "Epoch 233/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6890 - acc: 0.5000\n",
      "Epoch 234/500\n",
      "2/2 [==============================] - 0s 650us/step - loss: 0.6889 - acc: 0.5000\n",
      "Epoch 235/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6888 - acc: 0.5000\n",
      "Epoch 236/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6887 - acc: 0.5000\n",
      "Epoch 237/500\n",
      "2/2 [==============================] - 0s 960us/step - loss: 0.6886 - acc: 0.5000\n",
      "Epoch 238/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6885 - acc: 0.5000\n",
      "Epoch 239/500\n",
      "2/2 [==============================] - 0s 992us/step - loss: 0.6884 - acc: 0.5000\n",
      "Epoch 240/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6883 - acc: 0.5000\n",
      "Epoch 241/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6882 - acc: 0.5000\n",
      "Epoch 242/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6881 - acc: 0.5000\n",
      "Epoch 243/500\n",
      "2/2 [==============================] - 0s 620us/step - loss: 0.6880 - acc: 0.5000\n",
      "Epoch 244/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6879 - acc: 0.5000\n",
      "Epoch 245/500\n",
      "2/2 [==============================] - 0s 985us/step - loss: 0.6877 - acc: 0.5000\n",
      "Epoch 246/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6876 - acc: 0.5000\n",
      "Epoch 247/500\n",
      "2/2 [==============================] - 0s 674us/step - loss: 0.6875 - acc: 0.5000\n",
      "Epoch 248/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6874 - acc: 0.5000\n",
      "Epoch 249/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6873 - acc: 0.5000\n",
      "Epoch 250/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6872 - acc: 0.5000\n",
      "Epoch 251/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6871 - acc: 0.5000\n",
      "Epoch 252/500\n",
      "2/2 [==============================] - 0s 977us/step - loss: 0.6870 - acc: 0.5000\n",
      "Epoch 253/500\n",
      "2/2 [==============================] - 0s 975us/step - loss: 0.6869 - acc: 0.5000\n",
      "Epoch 254/500\n",
      "2/2 [==============================] - 0s 2ms/step - loss: 0.6868 - acc: 0.5000\n",
      "Epoch 255/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6867 - acc: 0.5000\n",
      "Epoch 256/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6866 - acc: 0.5000\n",
      "Epoch 257/500\n",
      "2/2 [==============================] - 0s 557us/step - loss: 0.6865 - acc: 0.5000\n",
      "Epoch 258/500\n",
      "2/2 [==============================] - 0s 973us/step - loss: 0.6864 - acc: 0.5000\n",
      "Epoch 259/500\n",
      "2/2 [==============================] - 0s 559us/step - loss: 0.6863 - acc: 0.5000\n",
      "Epoch 260/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6862 - acc: 0.5000\n",
      "Epoch 261/500\n",
      "2/2 [==============================] - 0s 536us/step - loss: 0.6861 - acc: 0.5000\n",
      "Epoch 262/500\n",
      "2/2 [==============================] - 0s 987us/step - loss: 0.6859 - acc: 0.5000\n",
      "Epoch 263/500\n",
      "2/2 [==============================] - 0s 568us/step - loss: 0.6858 - acc: 0.5000\n",
      "Epoch 264/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6857 - acc: 0.5000\n",
      "Epoch 265/500\n",
      "2/2 [==============================] - 0s 604us/step - loss: 0.6856 - acc: 0.5000\n",
      "Epoch 266/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6855 - acc: 0.5000\n",
      "Epoch 267/500\n",
      "2/2 [==============================] - 0s 501us/step - loss: 0.6854 - acc: 0.5000\n",
      "Epoch 268/500\n",
      "2/2 [==============================] - 0s 904us/step - loss: 0.6853 - acc: 0.5000\n",
      "Epoch 269/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6852 - acc: 0.5000\n",
      "Epoch 270/500\n",
      "2/2 [==============================] - 0s 908us/step - loss: 0.6851 - acc: 0.5000\n",
      "Epoch 271/500\n",
      "2/2 [==============================] - 0s 996us/step - loss: 0.6850 - acc: 0.5000\n",
      "Epoch 272/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6849 - acc: 0.5000\n",
      "Epoch 273/500\n",
      "2/2 [==============================] - 0s 985us/step - loss: 0.6848 - acc: 0.5000\n",
      "Epoch 274/500\n",
      "2/2 [==============================] - 0s 672us/step - loss: 0.6846 - acc: 0.5000\n",
      "Epoch 275/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6845 - acc: 0.5000\n",
      "Epoch 276/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6844 - acc: 0.5000\n",
      "Epoch 277/500\n",
      "2/2 [==============================] - 0s 621us/step - loss: 0.6843 - acc: 0.5000\n",
      "Epoch 278/500\n",
      "2/2 [==============================] - 0s 627us/step - loss: 0.6842 - acc: 0.5000\n",
      "Epoch 279/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6841 - acc: 0.5000\n",
      "Epoch 280/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6840 - acc: 0.5000\n",
      "Epoch 281/500\n",
      "2/2 [==============================] - 0s 621us/step - loss: 0.6839 - acc: 0.5000\n",
      "Epoch 282/500\n",
      "2/2 [==============================] - 0s 973us/step - loss: 0.6838 - acc: 0.5000\n",
      "Epoch 283/500\n",
      "2/2 [==============================] - 0s 566us/step - loss: 0.6836 - acc: 0.5000\n",
      "Epoch 284/500\n",
      "2/2 [==============================] - 0s 949us/step - loss: 0.6835 - acc: 0.5000\n",
      "Epoch 285/500\n",
      "2/2 [==============================] - 0s 604us/step - loss: 0.6834 - acc: 0.5000\n",
      "Epoch 286/500\n",
      "2/2 [==============================] - 0s 535us/step - loss: 0.6833 - acc: 0.5000\n",
      "Epoch 287/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6832 - acc: 0.5000\n",
      "Epoch 288/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6831 - acc: 0.5000\n",
      "Epoch 289/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6830 - acc: 0.5000\n",
      "Epoch 290/500\n",
      "2/2 [==============================] - 0s 938us/step - loss: 0.6829 - acc: 0.5000\n",
      "Epoch 291/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6827 - acc: 0.5000\n",
      "Epoch 292/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6826 - acc: 0.5000\n",
      "Epoch 293/500\n",
      "2/2 [==============================] - 0s 955us/step - loss: 0.6825 - acc: 0.5000\n",
      "Epoch 294/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6824 - acc: 0.5000\n",
      "Epoch 295/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6823 - acc: 0.5000\n",
      "Epoch 296/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6822 - acc: 0.5000\n",
      "Epoch 297/500\n",
      "2/2 [==============================] - 0s 591us/step - loss: 0.6821 - acc: 0.5000\n",
      "Epoch 298/500\n",
      "2/2 [==============================] - 0s 886us/step - loss: 0.6819 - acc: 0.5000\n",
      "Epoch 299/500\n",
      "2/2 [==============================] - 0s 930us/step - loss: 0.6818 - acc: 0.5000\n",
      "Epoch 300/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6817 - acc: 0.5000\n",
      "Epoch 301/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6816 - acc: 0.5000\n",
      "Epoch 302/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6815 - acc: 0.5000\n",
      "Epoch 303/500\n",
      "2/2 [==============================] - 0s 560us/step - loss: 0.6814 - acc: 0.5000\n",
      "Epoch 304/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6812 - acc: 0.5000\n",
      "Epoch 305/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6811 - acc: 0.5000\n",
      "Epoch 306/500\n",
      "2/2 [==============================] - 0s 551us/step - loss: 0.6810 - acc: 0.5000\n",
      "Epoch 307/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6809 - acc: 0.5000\n",
      "Epoch 308/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6808 - acc: 0.5000\n",
      "Epoch 309/500\n",
      "2/2 [==============================] - 0s 980us/step - loss: 0.6806 - acc: 0.5000\n",
      "Epoch 310/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6805 - acc: 0.5000\n",
      "Epoch 311/500\n",
      "2/2 [==============================] - 0s 968us/step - loss: 0.6804 - acc: 0.5000\n",
      "Epoch 312/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6803 - acc: 0.5000\n",
      "Epoch 313/500\n",
      "2/2 [==============================] - 0s 615us/step - loss: 0.6802 - acc: 0.5000\n",
      "Epoch 314/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6800 - acc: 0.5000\n",
      "Epoch 315/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6799 - acc: 0.5000\n",
      "Epoch 316/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6798 - acc: 0.5000\n",
      "Epoch 317/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6797 - acc: 0.5000\n",
      "Epoch 318/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6796 - acc: 0.5000\n",
      "Epoch 319/500\n",
      "2/2 [==============================] - 0s 987us/step - loss: 0.6794 - acc: 0.5000\n",
      "Epoch 320/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6793 - acc: 0.5000\n",
      "Epoch 321/500\n",
      "2/2 [==============================] - 0s 942us/step - loss: 0.6792 - acc: 0.5000\n",
      "Epoch 322/500\n",
      "2/2 [==============================] - 0s 969us/step - loss: 0.6791 - acc: 0.5000\n",
      "Epoch 323/500\n",
      "2/2 [==============================] - 0s 620us/step - loss: 0.6789 - acc: 0.5000\n",
      "Epoch 324/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6788 - acc: 0.5000\n",
      "Epoch 325/500\n",
      "2/2 [==============================] - 0s 991us/step - loss: 0.6787 - acc: 0.5000\n",
      "Epoch 326/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6786 - acc: 0.5000\n",
      "Epoch 327/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6784 - acc: 0.5000\n",
      "Epoch 328/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6783 - acc: 0.5000\n",
      "Epoch 329/500\n",
      "2/2 [==============================] - 0s 538us/step - loss: 0.6782 - acc: 0.5000\n",
      "Epoch 330/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6781 - acc: 0.5000\n",
      "Epoch 331/500\n",
      "2/2 [==============================] - 0s 938us/step - loss: 0.6779 - acc: 0.5000\n",
      "Epoch 332/500\n",
      "2/2 [==============================] - 0s 592us/step - loss: 0.6778 - acc: 0.5000\n",
      "Epoch 333/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6777 - acc: 0.5000\n",
      "Epoch 334/500\n",
      "2/2 [==============================] - 0s 591us/step - loss: 0.6776 - acc: 0.5000\n",
      "Epoch 335/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6774 - acc: 0.5000\n",
      "Epoch 336/500\n",
      "2/2 [==============================] - 0s 2ms/step - loss: 0.6773 - acc: 0.5000\n",
      "Epoch 337/500\n",
      "2/2 [==============================] - 0s 566us/step - loss: 0.6772 - acc: 0.5000\n",
      "Epoch 338/500\n",
      "2/2 [==============================] - 0s 969us/step - loss: 0.6770 - acc: 0.5000\n",
      "Epoch 339/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6769 - acc: 0.5000\n",
      "Epoch 340/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6768 - acc: 0.5000\n",
      "Epoch 341/500\n",
      "2/2 [==============================] - 0s 611us/step - loss: 0.6767 - acc: 0.5000\n",
      "Epoch 342/500\n",
      "2/2 [==============================] - 0s 584us/step - loss: 0.6765 - acc: 0.5000\n",
      "Epoch 343/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6764 - acc: 0.5000\n",
      "Epoch 344/500\n",
      "2/2 [==============================] - 0s 522us/step - loss: 0.6763 - acc: 0.5000\n",
      "Epoch 345/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6761 - acc: 0.5000\n",
      "Epoch 346/500\n",
      "2/2 [==============================] - 0s 995us/step - loss: 0.6760 - acc: 0.5000\n",
      "Epoch 347/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6759 - acc: 0.5000\n",
      "Epoch 348/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6757 - acc: 0.5000\n",
      "Epoch 349/500\n",
      "2/2 [==============================] - 0s 973us/step - loss: 0.6756 - acc: 0.5000\n",
      "Epoch 350/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6755 - acc: 0.5000\n",
      "Epoch 351/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6753 - acc: 0.5000\n",
      "Epoch 352/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6752 - acc: 0.5000\n",
      "Epoch 353/500\n",
      "2/2 [==============================] - 0s 549us/step - loss: 0.6751 - acc: 0.5000\n",
      "Epoch 354/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6749 - acc: 0.5000\n",
      "Epoch 355/500\n",
      "2/2 [==============================] - 0s 961us/step - loss: 0.6748 - acc: 0.5000\n",
      "Epoch 356/500\n",
      "2/2 [==============================] - 0s 2ms/step - loss: 0.6747 - acc: 0.5000\n",
      "Epoch 357/500\n",
      "2/2 [==============================] - 0s 561us/step - loss: 0.6745 - acc: 0.5000\n",
      "Epoch 358/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6744 - acc: 0.5000\n",
      "Epoch 359/500\n",
      "2/2 [==============================] - 0s 921us/step - loss: 0.6743 - acc: 0.5000\n",
      "Epoch 360/500\n",
      "2/2 [==============================] - 0s 547us/step - loss: 0.6741 - acc: 0.5000\n",
      "Epoch 361/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6740 - acc: 0.5000\n",
      "Epoch 362/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6739 - acc: 0.5000\n",
      "Epoch 363/500\n",
      "2/2 [==============================] - 0s 958us/step - loss: 0.6737 - acc: 0.5000\n",
      "Epoch 364/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6736 - acc: 0.5000\n",
      "Epoch 365/500\n",
      "2/2 [==============================] - 0s 592us/step - loss: 0.6734 - acc: 0.5000\n",
      "Epoch 366/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6733 - acc: 0.5000\n",
      "Epoch 367/500\n",
      "2/2 [==============================] - 0s 546us/step - loss: 0.6732 - acc: 0.5000\n",
      "Epoch 368/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6730 - acc: 0.5000\n",
      "Epoch 369/500\n",
      "2/2 [==============================] - 0s 526us/step - loss: 0.6729 - acc: 0.5000\n",
      "Epoch 370/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6728 - acc: 0.5000\n",
      "Epoch 371/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6726 - acc: 0.5000\n",
      "Epoch 372/500\n",
      "2/2 [==============================] - 0s 982us/step - loss: 0.6725 - acc: 0.5000\n",
      "Epoch 373/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6723 - acc: 0.5000\n",
      "Epoch 374/500\n",
      "2/2 [==============================] - 0s 997us/step - loss: 0.6722 - acc: 0.5000\n",
      "Epoch 375/500\n",
      "2/2 [==============================] - 0s 984us/step - loss: 0.6721 - acc: 0.5000\n",
      "Epoch 376/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6719 - acc: 0.5000\n",
      "Epoch 377/500\n",
      "2/2 [==============================] - 0s 658us/step - loss: 0.6718 - acc: 0.5000\n",
      "Epoch 378/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6716 - acc: 0.5000\n",
      "Epoch 379/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6715 - acc: 0.5000\n",
      "Epoch 380/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6713 - acc: 0.5000\n",
      "Epoch 381/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6712 - acc: 0.5000\n",
      "Epoch 382/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6711 - acc: 0.5000\n",
      "Epoch 383/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6709 - acc: 0.5000\n",
      "Epoch 384/500\n",
      "2/2 [==============================] - 0s 923us/step - loss: 0.6708 - acc: 0.5000\n",
      "Epoch 385/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6706 - acc: 0.5000\n",
      "Epoch 386/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6705 - acc: 0.5000\n",
      "Epoch 387/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6703 - acc: 0.5000\n",
      "Epoch 388/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6702 - acc: 0.5000\n",
      "Epoch 389/500\n",
      "2/2 [==============================] - 0s 565us/step - loss: 0.6701 - acc: 0.5000\n",
      "Epoch 390/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6699 - acc: 0.5000\n",
      "Epoch 391/500\n",
      "2/2 [==============================] - 0s 649us/step - loss: 0.6698 - acc: 0.5000\n",
      "Epoch 392/500\n",
      "2/2 [==============================] - 0s 917us/step - loss: 0.6696 - acc: 0.5000\n",
      "Epoch 393/500\n",
      "2/2 [==============================] - 0s 609us/step - loss: 0.6695 - acc: 0.5000\n",
      "Epoch 394/500\n",
      "2/2 [==============================] - 0s 995us/step - loss: 0.6693 - acc: 0.5000\n",
      "Epoch 395/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6692 - acc: 0.5000\n",
      "Epoch 396/500\n",
      "2/2 [==============================] - 0s 604us/step - loss: 0.6690 - acc: 0.5000\n",
      "Epoch 397/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6689 - acc: 0.5000\n",
      "Epoch 398/500\n",
      "2/2 [==============================] - 0s 563us/step - loss: 0.6688 - acc: 0.5000\n",
      "Epoch 399/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6686 - acc: 0.5000\n",
      "Epoch 400/500\n",
      "2/2 [==============================] - 0s 599us/step - loss: 0.6685 - acc: 0.5000\n",
      "Epoch 401/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6683 - acc: 0.5000\n",
      "Epoch 402/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6682 - acc: 0.5000\n",
      "Epoch 403/500\n",
      "2/2 [==============================] - 0s 603us/step - loss: 0.6680 - acc: 0.5000\n",
      "Epoch 404/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6679 - acc: 0.5000\n",
      "Epoch 405/500\n",
      "2/2 [==============================] - 0s 976us/step - loss: 0.6677 - acc: 0.5000\n",
      "Epoch 406/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6676 - acc: 0.5000\n",
      "Epoch 407/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6674 - acc: 0.5000\n",
      "Epoch 408/500\n",
      "2/2 [==============================] - 0s 569us/step - loss: 0.6673 - acc: 0.5000\n",
      "Epoch 409/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6671 - acc: 0.5000\n",
      "Epoch 410/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6670 - acc: 0.5000\n",
      "Epoch 411/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6668 - acc: 0.5000\n",
      "Epoch 412/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6667 - acc: 0.5000\n",
      "Epoch 413/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6665 - acc: 0.5000\n",
      "Epoch 414/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6664 - acc: 0.5000\n",
      "Epoch 415/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6663 - acc: 0.5000\n",
      "Epoch 416/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6661 - acc: 0.5000\n",
      "Epoch 417/500\n",
      "2/2 [==============================] - 0s 679us/step - loss: 0.6660 - acc: 0.5000\n",
      "Epoch 418/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6658 - acc: 0.5000\n",
      "Epoch 419/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6657 - acc: 0.5000\n",
      "Epoch 420/500\n",
      "2/2 [==============================] - 0s 588us/step - loss: 0.6655 - acc: 0.5000\n",
      "Epoch 421/500\n",
      "2/2 [==============================] - 0s 961us/step - loss: 0.6654 - acc: 0.5000\n",
      "Epoch 422/500\n",
      "2/2 [==============================] - 0s 600us/step - loss: 0.6652 - acc: 0.5000\n",
      "Epoch 423/500\n",
      "2/2 [==============================] - 0s 928us/step - loss: 0.6651 - acc: 0.5000\n",
      "Epoch 424/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6649 - acc: 0.5000\n",
      "Epoch 425/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6648 - acc: 0.5000\n",
      "Epoch 426/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6646 - acc: 0.5000\n",
      "Epoch 427/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6645 - acc: 0.5000\n",
      "Epoch 428/500\n",
      "2/2 [==============================] - 0s 977us/step - loss: 0.6643 - acc: 0.5000\n",
      "Epoch 429/500\n",
      "2/2 [==============================] - 0s 572us/step - loss: 0.6642 - acc: 0.5000\n",
      "Epoch 430/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6640 - acc: 0.5000\n",
      "Epoch 431/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6638 - acc: 0.5000\n",
      "Epoch 432/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6637 - acc: 0.5000\n",
      "Epoch 433/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6635 - acc: 0.5000\n",
      "Epoch 434/500\n",
      "2/2 [==============================] - 0s 995us/step - loss: 0.6634 - acc: 0.5000\n",
      "Epoch 435/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6632 - acc: 0.5000\n",
      "Epoch 436/500\n",
      "2/2 [==============================] - 0s 989us/step - loss: 0.6631 - acc: 0.5000\n",
      "Epoch 437/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6629 - acc: 1.0000\n",
      "Epoch 438/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6628 - acc: 1.0000\n",
      "Epoch 439/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6626 - acc: 1.0000\n",
      "Epoch 440/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6625 - acc: 1.0000\n",
      "Epoch 441/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6623 - acc: 1.0000\n",
      "Epoch 442/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6622 - acc: 1.0000\n",
      "Epoch 443/500\n",
      "2/2 [==============================] - 0s 988us/step - loss: 0.6620 - acc: 1.0000\n",
      "Epoch 444/500\n",
      "2/2 [==============================] - 0s 649us/step - loss: 0.6619 - acc: 1.0000\n",
      "Epoch 445/500\n",
      "2/2 [==============================] - 0s 574us/step - loss: 0.6617 - acc: 1.0000\n",
      "Epoch 446/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6616 - acc: 1.0000\n",
      "Epoch 447/500\n",
      "2/2 [==============================] - 0s 964us/step - loss: 0.6614 - acc: 1.0000\n",
      "Epoch 448/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6613 - acc: 1.0000\n",
      "Epoch 449/500\n",
      "2/2 [==============================] - 0s 975us/step - loss: 0.6611 - acc: 1.0000\n",
      "Epoch 450/500\n",
      "2/2 [==============================] - 0s 923us/step - loss: 0.6609 - acc: 1.0000\n",
      "Epoch 451/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6608 - acc: 1.0000\n",
      "Epoch 452/500\n",
      "2/2 [==============================] - 0s 580us/step - loss: 0.6606 - acc: 1.0000\n",
      "Epoch 453/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6605 - acc: 1.0000\n",
      "Epoch 454/500\n",
      "2/2 [==============================] - 0s 970us/step - loss: 0.6603 - acc: 1.0000\n",
      "Epoch 455/500\n",
      "2/2 [==============================] - 0s 982us/step - loss: 0.6602 - acc: 1.0000\n",
      "Epoch 456/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6600 - acc: 1.0000\n",
      "Epoch 457/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6599 - acc: 1.0000\n",
      "Epoch 458/500\n",
      "2/2 [==============================] - 0s 955us/step - loss: 0.6597 - acc: 1.0000\n",
      "Epoch 459/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6595 - acc: 1.0000\n",
      "Epoch 460/500\n",
      "2/2 [==============================] - 0s 2ms/step - loss: 0.6594 - acc: 1.0000\n",
      "Epoch 461/500\n",
      "2/2 [==============================] - 0s 598us/step - loss: 0.6592 - acc: 1.0000\n",
      "Epoch 462/500\n",
      "2/2 [==============================] - 0s 986us/step - loss: 0.6591 - acc: 1.0000\n",
      "Epoch 463/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6589 - acc: 1.0000\n",
      "Epoch 464/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6588 - acc: 1.0000\n",
      "Epoch 465/500\n",
      "2/2 [==============================] - 0s 971us/step - loss: 0.6586 - acc: 1.0000\n",
      "Epoch 466/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6584 - acc: 1.0000\n",
      "Epoch 467/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6583 - acc: 1.0000\n",
      "Epoch 468/500\n",
      "2/2 [==============================] - 0s 2ms/step - loss: 0.6581 - acc: 1.0000\n",
      "Epoch 469/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6580 - acc: 1.0000\n",
      "Epoch 470/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6578 - acc: 1.0000\n",
      "Epoch 471/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6577 - acc: 1.0000\n",
      "Epoch 472/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6575 - acc: 1.0000\n",
      "Epoch 473/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6573 - acc: 1.0000\n",
      "Epoch 474/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6572 - acc: 1.0000\n",
      "Epoch 475/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6570 - acc: 1.0000\n",
      "Epoch 476/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6569 - acc: 1.0000\n",
      "Epoch 477/500\n",
      "2/2 [==============================] - 0s 918us/step - loss: 0.6567 - acc: 1.0000\n",
      "Epoch 478/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6565 - acc: 1.0000\n",
      "Epoch 479/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6564 - acc: 1.0000\n",
      "Epoch 480/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6562 - acc: 1.0000\n",
      "Epoch 481/500\n",
      "2/2 [==============================] - 0s 929us/step - loss: 0.6561 - acc: 1.0000\n",
      "Epoch 482/500\n",
      "2/2 [==============================] - 0s 998us/step - loss: 0.6559 - acc: 1.0000\n",
      "Epoch 483/500\n",
      "2/2 [==============================] - 0s 561us/step - loss: 0.6557 - acc: 1.0000\n",
      "Epoch 484/500\n",
      "2/2 [==============================] - 0s 973us/step - loss: 0.6556 - acc: 1.0000\n",
      "Epoch 485/500\n",
      "2/2 [==============================] - 0s 991us/step - loss: 0.6554 - acc: 1.0000\n",
      "Epoch 486/500\n",
      "2/2 [==============================] - 0s 616us/step - loss: 0.6552 - acc: 1.0000\n",
      "Epoch 487/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6551 - acc: 1.0000\n",
      "Epoch 488/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6549 - acc: 1.0000\n",
      "Epoch 489/500\n",
      "2/2 [==============================] - 0s 972us/step - loss: 0.6548 - acc: 1.0000\n",
      "Epoch 490/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6546 - acc: 1.0000\n",
      "Epoch 491/500\n",
      "2/2 [==============================] - 0s 617us/step - loss: 0.6544 - acc: 1.0000\n",
      "Epoch 492/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6543 - acc: 1.0000\n",
      "Epoch 493/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6541 - acc: 1.0000\n",
      "Epoch 494/500\n",
      "2/2 [==============================] - 0s 978us/step - loss: 0.6539 - acc: 1.0000\n",
      "Epoch 495/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6538 - acc: 1.0000\n",
      "Epoch 496/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6536 - acc: 1.0000\n",
      "Epoch 497/500\n",
      "2/2 [==============================] - 0s 547us/step - loss: 0.6534 - acc: 1.0000\n",
      "Epoch 498/500\n",
      "2/2 [==============================] - 0s 918us/step - loss: 0.6533 - acc: 1.0000\n",
      "Epoch 499/500\n",
      "2/2 [==============================] - 0s 582us/step - loss: 0.6531 - acc: 1.0000\n",
      "Epoch 500/500\n",
      "2/2 [==============================] - 0s 949us/step - loss: 0.6529 - acc: 1.0000\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "<keras.callbacks.History at 0x7f6d77ebf908>"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model.fit(padded_docs.reshape(2,2,1),np.array(labels).reshape(max_length,1),epochs=500)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[1, 3],\n",
       "       [1, 2]], dtype=int32)"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "padded_docs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<keras.layers.recurrent.SimpleRNN at 0x7f6d743129e8>,\n",
       " <keras.layers.core.Dense at 0x7f6d74312748>]"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model.layers"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<tf.Variable 'simple_rnn_2/kernel:0' shape=(1, 1) dtype=float32_ref>,\n",
       " <tf.Variable 'simple_rnn_2/recurrent_kernel:0' shape=(1, 1) dtype=float32_ref>,\n",
       " <tf.Variable 'simple_rnn_2/bias:0' shape=(1,) dtype=float32_ref>,\n",
       " <tf.Variable 'dense_2/kernel:0' shape=(1, 1) dtype=float32_ref>,\n",
       " <tf.Variable 'dense_2/bias:0' shape=(1,) dtype=float32_ref>]"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model.weights"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[array([[0.56373304]], dtype=float32),\n",
       " array([[-0.50989217]], dtype=float32),\n",
       " array([-0.69803804], dtype=float32),\n",
       " array([[0.5092683]], dtype=float32),\n",
       " array([-0.27220774], dtype=float32)]"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model.get_weights()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[array([[0.56373304]], dtype=float32),\n",
       " array([[-0.50989217]], dtype=float32),\n",
       " array([-0.69803804], dtype=float32)]"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model.layers[0].get_weights()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[[1],\n",
       "        [3]]], dtype=int32)"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "padded_docs[0].reshape(1,2,1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[0.53199273]], dtype=float32)"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import numpy as np\n",
    "model.predict(padded_docs[0].reshape(1,2,1))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "simple_rnn_2/kernel:0 (1, 1)\n",
      "simple_rnn_2/recurrent_kernel:0 (1, 1)\n",
      "simple_rnn_2/bias:0 (1,)\n",
      "dense_2/kernel:0 (1, 1)\n",
      "dense_2/bias:0 (1,)\n"
     ]
    }
   ],
   "source": [
    "names = [weight.name for layer in model.layers for weight in layer.weights]\n",
    "weights = model.get_weights()\n",
    "\n",
    "for name, weight in zip(names, weights):\n",
    "    print(name, weight.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "_________________________________________________________________\n",
      "Layer (type)                 Output Shape              Param #   \n",
      "=================================================================\n",
      "lstm_1 (LSTM)                (None, 1)                 12        \n",
      "_________________________________________________________________\n",
      "dense_3 (Dense)              (None, 1)                 2         \n",
      "=================================================================\n",
      "Total params: 14\n",
      "Trainable params: 14\n",
      "Non-trainable params: 0\n",
      "_________________________________________________________________\n",
      "None\n"
     ]
    }
   ],
   "source": [
    "model = Sequential()\n",
    "model.add(LSTM(1,activation='tanh', return_sequences=False,recurrent_initializer='Zeros',recurrent_activation='sigmoid',\n",
    "               input_shape=(2,1),unroll=True))\n",
    "model.add(Dense(1, activation='sigmoid'))\n",
    "#model.add(Dense(1))\n",
    "# compile the model\n",
    "model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['acc'])\n",
    "# summarize the model\n",
    "print(model.summary())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch 1/500\n",
      "2/2 [==============================] - 0s 199ms/step - loss: 0.7267 - acc: 0.5000\n",
      "Epoch 2/500\n",
      "2/2 [==============================] - 0s 880us/step - loss: 0.7264 - acc: 0.5000\n",
      "Epoch 3/500\n",
      "2/2 [==============================] - 0s 763us/step - loss: 0.7261 - acc: 0.5000\n",
      "Epoch 4/500\n",
      "2/2 [==============================] - 0s 706us/step - loss: 0.7257 - acc: 0.5000\n",
      "Epoch 5/500\n",
      "2/2 [==============================] - 0s 739us/step - loss: 0.7254 - acc: 0.5000\n",
      "Epoch 6/500\n",
      "2/2 [==============================] - 0s 667us/step - loss: 0.7250 - acc: 0.5000\n",
      "Epoch 7/500\n",
      "2/2 [==============================] - 0s 778us/step - loss: 0.7247 - acc: 0.5000\n",
      "Epoch 8/500\n",
      "2/2 [==============================] - 0s 714us/step - loss: 0.7244 - acc: 0.5000\n",
      "Epoch 9/500\n",
      "2/2 [==============================] - 0s 688us/step - loss: 0.7241 - acc: 0.5000\n",
      "Epoch 10/500\n",
      "2/2 [==============================] - 0s 759us/step - loss: 0.7237 - acc: 0.5000\n",
      "Epoch 11/500\n",
      "2/2 [==============================] - 0s 725us/step - loss: 0.7234 - acc: 0.5000\n",
      "Epoch 12/500\n",
      "2/2 [==============================] - 0s 684us/step - loss: 0.7231 - acc: 0.5000\n",
      "Epoch 13/500\n",
      "2/2 [==============================] - 0s 675us/step - loss: 0.7228 - acc: 0.5000\n",
      "Epoch 14/500\n",
      "2/2 [==============================] - 0s 704us/step - loss: 0.7225 - acc: 0.5000\n",
      "Epoch 15/500\n",
      "2/2 [==============================] - 0s 735us/step - loss: 0.7222 - acc: 0.5000\n",
      "Epoch 16/500\n",
      "2/2 [==============================] - 0s 719us/step - loss: 0.7218 - acc: 0.5000\n",
      "Epoch 17/500\n",
      "2/2 [==============================] - 0s 788us/step - loss: 0.7215 - acc: 0.5000\n",
      "Epoch 18/500\n",
      "2/2 [==============================] - 0s 682us/step - loss: 0.7212 - acc: 0.5000\n",
      "Epoch 19/500\n",
      "2/2 [==============================] - 0s 735us/step - loss: 0.7209 - acc: 0.5000\n",
      "Epoch 20/500\n",
      "2/2 [==============================] - 0s 729us/step - loss: 0.7206 - acc: 0.5000\n",
      "Epoch 21/500\n",
      "2/2 [==============================] - 0s 755us/step - loss: 0.7203 - acc: 0.5000\n",
      "Epoch 22/500\n",
      "2/2 [==============================] - 0s 767us/step - loss: 0.7201 - acc: 0.5000\n",
      "Epoch 23/500\n",
      "2/2 [==============================] - 0s 937us/step - loss: 0.7198 - acc: 0.5000\n",
      "Epoch 24/500\n",
      "2/2 [==============================] - 0s 742us/step - loss: 0.7195 - acc: 0.5000\n",
      "Epoch 25/500\n",
      "2/2 [==============================] - 0s 778us/step - loss: 0.7192 - acc: 0.5000\n",
      "Epoch 26/500\n",
      "2/2 [==============================] - 0s 796us/step - loss: 0.7189 - acc: 0.5000\n",
      "Epoch 27/500\n",
      "2/2 [==============================] - 0s 761us/step - loss: 0.7186 - acc: 0.5000\n",
      "Epoch 28/500\n",
      "2/2 [==============================] - 0s 808us/step - loss: 0.7184 - acc: 0.5000\n",
      "Epoch 29/500\n",
      "2/2 [==============================] - 0s 692us/step - loss: 0.7181 - acc: 0.5000\n",
      "Epoch 30/500\n",
      "2/2 [==============================] - 0s 730us/step - loss: 0.7178 - acc: 0.5000\n",
      "Epoch 31/500\n",
      "2/2 [==============================] - 0s 769us/step - loss: 0.7176 - acc: 0.5000\n",
      "Epoch 32/500\n",
      "2/2 [==============================] - 0s 718us/step - loss: 0.7173 - acc: 0.5000\n",
      "Epoch 33/500\n",
      "2/2 [==============================] - 0s 802us/step - loss: 0.7171 - acc: 0.5000\n",
      "Epoch 34/500\n",
      "2/2 [==============================] - 0s 752us/step - loss: 0.7168 - acc: 0.5000\n",
      "Epoch 35/500\n",
      "2/2 [==============================] - 0s 760us/step - loss: 0.7165 - acc: 0.5000\n",
      "Epoch 36/500\n",
      "2/2 [==============================] - 0s 686us/step - loss: 0.7163 - acc: 0.5000\n",
      "Epoch 37/500\n",
      "2/2 [==============================] - 0s 736us/step - loss: 0.7160 - acc: 0.5000\n",
      "Epoch 38/500\n",
      "2/2 [==============================] - 0s 701us/step - loss: 0.7158 - acc: 0.5000\n",
      "Epoch 39/500\n",
      "2/2 [==============================] - 0s 703us/step - loss: 0.7156 - acc: 0.5000\n",
      "Epoch 40/500\n",
      "2/2 [==============================] - 0s 742us/step - loss: 0.7153 - acc: 0.5000\n",
      "Epoch 41/500\n",
      "2/2 [==============================] - 0s 763us/step - loss: 0.7151 - acc: 0.5000\n",
      "Epoch 42/500\n",
      "2/2 [==============================] - 0s 772us/step - loss: 0.7148 - acc: 0.5000\n",
      "Epoch 43/500\n",
      "2/2 [==============================] - 0s 775us/step - loss: 0.7146 - acc: 0.5000\n",
      "Epoch 44/500\n",
      "2/2 [==============================] - 0s 686us/step - loss: 0.7144 - acc: 0.5000\n",
      "Epoch 45/500\n",
      "2/2 [==============================] - 0s 727us/step - loss: 0.7142 - acc: 0.5000\n",
      "Epoch 46/500\n",
      "2/2 [==============================] - 0s 732us/step - loss: 0.7139 - acc: 0.5000\n",
      "Epoch 47/500\n",
      "2/2 [==============================] - 0s 680us/step - loss: 0.7137 - acc: 0.5000\n",
      "Epoch 48/500\n",
      "2/2 [==============================] - 0s 651us/step - loss: 0.7135 - acc: 0.5000\n",
      "Epoch 49/500\n",
      "2/2 [==============================] - 0s 817us/step - loss: 0.7133 - acc: 0.5000\n",
      "Epoch 50/500\n",
      "2/2 [==============================] - 0s 767us/step - loss: 0.7131 - acc: 0.5000\n",
      "Epoch 51/500\n",
      "2/2 [==============================] - 0s 805us/step - loss: 0.7128 - acc: 0.5000\n",
      "Epoch 52/500\n",
      "2/2 [==============================] - 0s 751us/step - loss: 0.7126 - acc: 0.5000\n",
      "Epoch 53/500\n",
      "2/2 [==============================] - 0s 756us/step - loss: 0.7124 - acc: 0.5000\n",
      "Epoch 54/500\n",
      "2/2 [==============================] - 0s 766us/step - loss: 0.7122 - acc: 0.5000\n",
      "Epoch 55/500\n",
      "2/2 [==============================] - 0s 745us/step - loss: 0.7120 - acc: 0.5000\n",
      "Epoch 56/500\n",
      "2/2 [==============================] - 0s 750us/step - loss: 0.7118 - acc: 0.5000\n",
      "Epoch 57/500\n",
      "2/2 [==============================] - 0s 765us/step - loss: 0.7116 - acc: 0.5000\n",
      "Epoch 58/500\n",
      "2/2 [==============================] - 0s 745us/step - loss: 0.7114 - acc: 0.5000\n",
      "Epoch 59/500\n",
      "2/2 [==============================] - 0s 760us/step - loss: 0.7112 - acc: 0.5000\n",
      "Epoch 60/500\n",
      "2/2 [==============================] - 0s 800us/step - loss: 0.7111 - acc: 0.5000\n",
      "Epoch 61/500\n",
      "2/2 [==============================] - 0s 786us/step - loss: 0.7109 - acc: 0.5000\n",
      "Epoch 62/500\n",
      "2/2 [==============================] - 0s 809us/step - loss: 0.7107 - acc: 0.5000\n",
      "Epoch 63/500\n",
      "2/2 [==============================] - 0s 805us/step - loss: 0.7105 - acc: 0.5000\n",
      "Epoch 64/500\n",
      "2/2 [==============================] - 0s 764us/step - loss: 0.7103 - acc: 0.5000\n",
      "Epoch 65/500\n",
      "2/2 [==============================] - 0s 740us/step - loss: 0.7101 - acc: 0.5000\n",
      "Epoch 66/500\n",
      "2/2 [==============================] - 0s 682us/step - loss: 0.7100 - acc: 0.5000\n",
      "Epoch 67/500\n",
      "2/2 [==============================] - 0s 740us/step - loss: 0.7098 - acc: 0.5000\n",
      "Epoch 68/500\n",
      "2/2 [==============================] - 0s 809us/step - loss: 0.7096 - acc: 0.5000\n",
      "Epoch 69/500\n",
      "2/2 [==============================] - 0s 763us/step - loss: 0.7094 - acc: 0.5000\n",
      "Epoch 70/500\n",
      "2/2 [==============================] - 0s 766us/step - loss: 0.7093 - acc: 0.5000\n",
      "Epoch 71/500\n",
      "2/2 [==============================] - 0s 796us/step - loss: 0.7091 - acc: 0.5000\n",
      "Epoch 72/500\n",
      "2/2 [==============================] - 0s 827us/step - loss: 0.7089 - acc: 0.5000\n",
      "Epoch 73/500\n",
      "2/2 [==============================] - 0s 736us/step - loss: 0.7088 - acc: 0.5000\n",
      "Epoch 74/500\n",
      "2/2 [==============================] - 0s 753us/step - loss: 0.7086 - acc: 0.5000\n",
      "Epoch 75/500\n",
      "2/2 [==============================] - 0s 831us/step - loss: 0.7084 - acc: 0.5000\n",
      "Epoch 76/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7083 - acc: 0.5000\n",
      "Epoch 77/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7081 - acc: 0.5000\n",
      "Epoch 78/500\n",
      "2/2 [==============================] - 0s 767us/step - loss: 0.7080 - acc: 0.5000\n",
      "Epoch 79/500\n",
      "2/2 [==============================] - 0s 754us/step - loss: 0.7078 - acc: 0.5000\n",
      "Epoch 80/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7077 - acc: 0.5000\n",
      "Epoch 81/500\n",
      "2/2 [==============================] - 0s 719us/step - loss: 0.7075 - acc: 0.5000\n",
      "Epoch 82/500\n",
      "2/2 [==============================] - 0s 805us/step - loss: 0.7074 - acc: 0.5000\n",
      "Epoch 83/500\n",
      "2/2 [==============================] - 0s 2ms/step - loss: 0.7072 - acc: 0.5000\n",
      "Epoch 84/500\n",
      "2/2 [==============================] - 0s 2ms/step - loss: 0.7071 - acc: 0.5000\n",
      "Epoch 85/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7070 - acc: 0.5000\n",
      "Epoch 86/500\n",
      "2/2 [==============================] - 0s 2ms/step - loss: 0.7068 - acc: 0.5000\n",
      "Epoch 87/500\n",
      "2/2 [==============================] - 0s 755us/step - loss: 0.7067 - acc: 0.5000\n",
      "Epoch 88/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7065 - acc: 0.5000\n",
      "Epoch 89/500\n",
      "2/2 [==============================] - 0s 769us/step - loss: 0.7064 - acc: 0.5000\n",
      "Epoch 90/500\n",
      "2/2 [==============================] - 0s 809us/step - loss: 0.7063 - acc: 0.5000\n",
      "Epoch 91/500\n",
      "2/2 [==============================] - 0s 737us/step - loss: 0.7061 - acc: 0.5000\n",
      "Epoch 92/500\n",
      "2/2 [==============================] - 0s 750us/step - loss: 0.7060 - acc: 0.5000\n",
      "Epoch 93/500\n",
      "2/2 [==============================] - 0s 783us/step - loss: 0.7059 - acc: 0.5000\n",
      "Epoch 94/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7057 - acc: 0.5000\n",
      "Epoch 95/500\n",
      "2/2 [==============================] - 0s 824us/step - loss: 0.7056 - acc: 0.5000\n",
      "Epoch 96/500\n",
      "2/2 [==============================] - 0s 763us/step - loss: 0.7055 - acc: 0.5000\n",
      "Epoch 97/500\n",
      "2/2 [==============================] - 0s 771us/step - loss: 0.7054 - acc: 0.5000\n",
      "Epoch 98/500\n",
      "2/2 [==============================] - 0s 751us/step - loss: 0.7052 - acc: 0.5000\n",
      "Epoch 99/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7051 - acc: 0.5000\n",
      "Epoch 100/500\n",
      "2/2 [==============================] - 0s 781us/step - loss: 0.7050 - acc: 0.5000\n",
      "Epoch 101/500\n",
      "2/2 [==============================] - 0s 750us/step - loss: 0.7049 - acc: 0.5000\n",
      "Epoch 102/500\n",
      "2/2 [==============================] - 0s 757us/step - loss: 0.7048 - acc: 0.5000\n",
      "Epoch 103/500\n",
      "2/2 [==============================] - 0s 754us/step - loss: 0.7047 - acc: 0.5000\n",
      "Epoch 104/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7045 - acc: 0.5000\n",
      "Epoch 105/500\n",
      "2/2 [==============================] - 0s 748us/step - loss: 0.7044 - acc: 0.5000\n",
      "Epoch 106/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7043 - acc: 0.5000\n",
      "Epoch 107/500\n",
      "2/2 [==============================] - 0s 735us/step - loss: 0.7042 - acc: 0.5000\n",
      "Epoch 108/500\n",
      "2/2 [==============================] - 0s 762us/step - loss: 0.7041 - acc: 0.5000\n",
      "Epoch 109/500\n",
      "2/2 [==============================] - 0s 755us/step - loss: 0.7040 - acc: 0.5000\n",
      "Epoch 110/500\n",
      "2/2 [==============================] - 0s 776us/step - loss: 0.7039 - acc: 0.5000\n",
      "Epoch 111/500\n",
      "2/2 [==============================] - 0s 675us/step - loss: 0.7038 - acc: 0.5000\n",
      "Epoch 112/500\n",
      "2/2 [==============================] - 0s 677us/step - loss: 0.7037 - acc: 0.5000\n",
      "Epoch 113/500\n",
      "2/2 [==============================] - 0s 698us/step - loss: 0.7036 - acc: 0.5000\n",
      "Epoch 114/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7035 - acc: 0.5000\n",
      "Epoch 115/500\n",
      "2/2 [==============================] - 0s 823us/step - loss: 0.7034 - acc: 0.5000\n",
      "Epoch 116/500\n",
      "2/2 [==============================] - 0s 2ms/step - loss: 0.7033 - acc: 0.5000\n",
      "Epoch 117/500\n",
      "2/2 [==============================] - 0s 783us/step - loss: 0.7032 - acc: 0.5000\n",
      "Epoch 118/500\n",
      "2/2 [==============================] - 0s 710us/step - loss: 0.7031 - acc: 0.5000\n",
      "Epoch 119/500\n",
      "2/2 [==============================] - 0s 735us/step - loss: 0.7030 - acc: 0.5000\n",
      "Epoch 120/500\n",
      "2/2 [==============================] - 0s 677us/step - loss: 0.7029 - acc: 0.5000\n",
      "Epoch 121/500\n",
      "2/2 [==============================] - 0s 706us/step - loss: 0.7028 - acc: 0.5000\n",
      "Epoch 122/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7027 - acc: 0.5000\n",
      "Epoch 123/500\n",
      "2/2 [==============================] - 0s 740us/step - loss: 0.7026 - acc: 0.5000\n",
      "Epoch 124/500\n",
      "2/2 [==============================] - 0s 812us/step - loss: 0.7025 - acc: 0.5000\n",
      "Epoch 125/500\n",
      "2/2 [==============================] - 0s 769us/step - loss: 0.7024 - acc: 0.5000\n",
      "Epoch 126/500\n",
      "2/2 [==============================] - 0s 766us/step - loss: 0.7023 - acc: 0.5000\n",
      "Epoch 127/500\n",
      "2/2 [==============================] - 0s 788us/step - loss: 0.7022 - acc: 0.5000\n",
      "Epoch 128/500\n",
      "2/2 [==============================] - 0s 723us/step - loss: 0.7021 - acc: 0.5000\n",
      "Epoch 129/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7021 - acc: 0.5000\n",
      "Epoch 130/500\n",
      "2/2 [==============================] - 0s 791us/step - loss: 0.7020 - acc: 0.5000\n",
      "Epoch 131/500\n",
      "2/2 [==============================] - 0s 737us/step - loss: 0.7019 - acc: 0.5000\n",
      "Epoch 132/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7018 - acc: 0.5000\n",
      "Epoch 133/500\n",
      "2/2 [==============================] - 0s 765us/step - loss: 0.7017 - acc: 0.5000\n",
      "Epoch 134/500\n",
      "2/2 [==============================] - 0s 737us/step - loss: 0.7016 - acc: 0.5000\n",
      "Epoch 135/500\n",
      "2/2 [==============================] - 0s 751us/step - loss: 0.7016 - acc: 0.5000\n",
      "Epoch 136/500\n",
      "2/2 [==============================] - 0s 726us/step - loss: 0.7015 - acc: 0.5000\n",
      "Epoch 137/500\n",
      "2/2 [==============================] - 0s 730us/step - loss: 0.7014 - acc: 0.5000\n",
      "Epoch 138/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7013 - acc: 0.5000\n",
      "Epoch 139/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7012 - acc: 0.5000\n",
      "Epoch 140/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7011 - acc: 0.5000\n",
      "Epoch 141/500\n",
      "2/2 [==============================] - 0s 794us/step - loss: 0.7011 - acc: 0.5000\n",
      "Epoch 142/500\n",
      "2/2 [==============================] - 0s 787us/step - loss: 0.7010 - acc: 0.5000\n",
      "Epoch 143/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7009 - acc: 0.5000\n",
      "Epoch 144/500\n",
      "2/2 [==============================] - 0s 689us/step - loss: 0.7008 - acc: 0.5000\n",
      "Epoch 145/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7008 - acc: 0.5000\n",
      "Epoch 146/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7007 - acc: 0.5000\n",
      "Epoch 147/500\n",
      "2/2 [==============================] - 0s 669us/step - loss: 0.7006 - acc: 0.5000\n",
      "Epoch 148/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7005 - acc: 0.5000\n",
      "Epoch 149/500\n",
      "2/2 [==============================] - 0s 2ms/step - loss: 0.7005 - acc: 0.5000\n",
      "Epoch 150/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7004 - acc: 0.5000\n",
      "Epoch 151/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7003 - acc: 0.5000\n",
      "Epoch 152/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7003 - acc: 0.5000\n",
      "Epoch 153/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7002 - acc: 0.5000\n",
      "Epoch 154/500\n",
      "2/2 [==============================] - 0s 2ms/step - loss: 0.7001 - acc: 0.5000\n",
      "Epoch 155/500\n",
      "2/2 [==============================] - 0s 728us/step - loss: 0.7000 - acc: 0.5000\n",
      "Epoch 156/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.7000 - acc: 0.5000\n",
      "Epoch 157/500\n",
      "2/2 [==============================] - 0s 2ms/step - loss: 0.6999 - acc: 0.5000\n",
      "Epoch 158/500\n",
      "2/2 [==============================] - 0s 686us/step - loss: 0.6998 - acc: 0.5000\n",
      "Epoch 159/500\n",
      "2/2 [==============================] - 0s 2ms/step - loss: 0.6998 - acc: 0.5000\n",
      "Epoch 160/500\n",
      "2/2 [==============================] - 0s 734us/step - loss: 0.6997 - acc: 0.5000\n",
      "Epoch 161/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6996 - acc: 0.5000\n",
      "Epoch 162/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6996 - acc: 0.5000\n",
      "Epoch 163/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6995 - acc: 0.5000\n",
      "Epoch 164/500\n",
      "2/2 [==============================] - 0s 698us/step - loss: 0.6994 - acc: 0.5000\n",
      "Epoch 165/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6994 - acc: 0.5000\n",
      "Epoch 166/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6993 - acc: 0.5000\n",
      "Epoch 167/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6992 - acc: 0.5000\n",
      "Epoch 168/500\n",
      "2/2 [==============================] - 0s 690us/step - loss: 0.6992 - acc: 0.5000\n",
      "Epoch 169/500\n",
      "2/2 [==============================] - 0s 676us/step - loss: 0.6991 - acc: 0.5000\n",
      "Epoch 170/500\n",
      "2/2 [==============================] - 0s 770us/step - loss: 0.6990 - acc: 0.5000\n",
      "Epoch 171/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6990 - acc: 0.5000\n",
      "Epoch 172/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6989 - acc: 0.5000\n",
      "Epoch 173/500\n",
      "2/2 [==============================] - 0s 659us/step - loss: 0.6989 - acc: 0.5000\n",
      "Epoch 174/500\n",
      "2/2 [==============================] - 0s 659us/step - loss: 0.6988 - acc: 0.5000\n",
      "Epoch 175/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6987 - acc: 0.5000\n",
      "Epoch 176/500\n",
      "2/2 [==============================] - 0s 665us/step - loss: 0.6987 - acc: 0.5000\n",
      "Epoch 177/500\n",
      "2/2 [==============================] - 0s 2ms/step - loss: 0.6986 - acc: 0.5000\n",
      "Epoch 178/500\n",
      "2/2 [==============================] - 0s 773us/step - loss: 0.6985 - acc: 0.5000\n",
      "Epoch 179/500\n",
      "2/2 [==============================] - 0s 2ms/step - loss: 0.6985 - acc: 0.5000\n",
      "Epoch 180/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6984 - acc: 0.5000\n",
      "Epoch 181/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6984 - acc: 0.5000\n",
      "Epoch 182/500\n",
      "2/2 [==============================] - 0s 705us/step - loss: 0.6983 - acc: 0.5000\n",
      "Epoch 183/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6982 - acc: 0.5000\n",
      "Epoch 184/500\n",
      "2/2 [==============================] - 0s 739us/step - loss: 0.6982 - acc: 0.5000\n",
      "Epoch 185/500\n",
      "2/2 [==============================] - 0s 788us/step - loss: 0.6981 - acc: 0.5000\n",
      "Epoch 186/500\n",
      "2/2 [==============================] - 0s 744us/step - loss: 0.6981 - acc: 0.5000\n",
      "Epoch 187/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6980 - acc: 0.5000\n",
      "Epoch 188/500\n",
      "2/2 [==============================] - 0s 707us/step - loss: 0.6979 - acc: 0.5000\n",
      "Epoch 189/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6979 - acc: 0.5000\n",
      "Epoch 190/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6978 - acc: 0.5000\n",
      "Epoch 191/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6978 - acc: 0.5000\n",
      "Epoch 192/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6977 - acc: 0.5000\n",
      "Epoch 193/500\n",
      "2/2 [==============================] - 0s 765us/step - loss: 0.6976 - acc: 0.5000\n",
      "Epoch 194/500\n",
      "2/2 [==============================] - 0s 795us/step - loss: 0.6976 - acc: 0.5000\n",
      "Epoch 195/500\n",
      "2/2 [==============================] - 0s 800us/step - loss: 0.6975 - acc: 0.5000\n",
      "Epoch 196/500\n",
      "2/2 [==============================] - 0s 781us/step - loss: 0.6975 - acc: 0.5000\n",
      "Epoch 197/500\n",
      "2/2 [==============================] - 0s 738us/step - loss: 0.6974 - acc: 0.5000\n",
      "Epoch 198/500\n",
      "2/2 [==============================] - 0s 740us/step - loss: 0.6973 - acc: 0.5000\n",
      "Epoch 199/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6973 - acc: 0.5000\n",
      "Epoch 200/500\n",
      "2/2 [==============================] - 0s 731us/step - loss: 0.6972 - acc: 0.5000\n",
      "Epoch 201/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6972 - acc: 0.5000\n",
      "Epoch 202/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6971 - acc: 0.5000\n",
      "Epoch 203/500\n",
      "2/2 [==============================] - 0s 699us/step - loss: 0.6970 - acc: 0.5000\n",
      "Epoch 204/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6970 - acc: 0.5000\n",
      "Epoch 205/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6969 - acc: 0.5000\n",
      "Epoch 206/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6969 - acc: 0.5000\n",
      "Epoch 207/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6968 - acc: 0.5000\n",
      "Epoch 208/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6967 - acc: 0.5000\n",
      "Epoch 209/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6967 - acc: 0.5000\n",
      "Epoch 210/500\n",
      "2/2 [==============================] - 0s 2ms/step - loss: 0.6966 - acc: 0.5000\n",
      "Epoch 211/500\n",
      "2/2 [==============================] - 0s 711us/step - loss: 0.6966 - acc: 0.5000\n",
      "Epoch 212/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6965 - acc: 0.5000\n",
      "Epoch 213/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6964 - acc: 0.5000\n",
      "Epoch 214/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6964 - acc: 0.5000\n",
      "Epoch 215/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6963 - acc: 0.5000\n",
      "Epoch 216/500\n",
      "2/2 [==============================] - 0s 617us/step - loss: 0.6963 - acc: 0.5000\n",
      "Epoch 217/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6962 - acc: 0.5000\n",
      "Epoch 218/500\n",
      "2/2 [==============================] - 0s 745us/step - loss: 0.6961 - acc: 0.5000\n",
      "Epoch 219/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6961 - acc: 0.5000\n",
      "Epoch 220/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6960 - acc: 0.5000\n",
      "Epoch 221/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6960 - acc: 0.5000\n",
      "Epoch 222/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6959 - acc: 0.5000\n",
      "Epoch 223/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6958 - acc: 0.5000\n",
      "Epoch 224/500\n",
      "2/2 [==============================] - 0s 723us/step - loss: 0.6958 - acc: 0.5000\n",
      "Epoch 225/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6957 - acc: 0.5000\n",
      "Epoch 226/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6956 - acc: 0.5000\n",
      "Epoch 227/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6956 - acc: 0.5000\n",
      "Epoch 228/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6955 - acc: 0.5000\n",
      "Epoch 229/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6955 - acc: 0.5000\n",
      "Epoch 230/500\n",
      "2/2 [==============================] - 0s 685us/step - loss: 0.6954 - acc: 0.5000\n",
      "Epoch 231/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6953 - acc: 0.5000\n",
      "Epoch 232/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6953 - acc: 0.5000\n",
      "Epoch 233/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6952 - acc: 0.5000\n",
      "Epoch 234/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6951 - acc: 0.5000\n",
      "Epoch 235/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6951 - acc: 0.5000\n",
      "Epoch 236/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6950 - acc: 0.5000\n",
      "Epoch 237/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6949 - acc: 0.5000\n",
      "Epoch 238/500\n",
      "2/2 [==============================] - 0s 2ms/step - loss: 0.6949 - acc: 0.5000\n",
      "Epoch 239/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6948 - acc: 0.5000\n",
      "Epoch 240/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6947 - acc: 0.5000\n",
      "Epoch 241/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6947 - acc: 0.5000\n",
      "Epoch 242/500\n",
      "2/2 [==============================] - 0s 698us/step - loss: 0.6946 - acc: 0.5000\n",
      "Epoch 243/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6945 - acc: 0.5000\n",
      "Epoch 244/500\n",
      "2/2 [==============================] - 0s 743us/step - loss: 0.6945 - acc: 0.5000\n",
      "Epoch 245/500\n",
      "2/2 [==============================] - 0s 700us/step - loss: 0.6944 - acc: 0.5000\n",
      "Epoch 246/500\n",
      "2/2 [==============================] - 0s 688us/step - loss: 0.6943 - acc: 0.5000\n",
      "Epoch 247/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6942 - acc: 0.5000\n",
      "Epoch 248/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6942 - acc: 0.5000\n",
      "Epoch 249/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6941 - acc: 0.5000\n",
      "Epoch 250/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6940 - acc: 0.5000\n",
      "Epoch 251/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6940 - acc: 0.5000\n",
      "Epoch 252/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6939 - acc: 0.5000\n",
      "Epoch 253/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6938 - acc: 0.5000\n",
      "Epoch 254/500\n",
      "2/2 [==============================] - 0s 745us/step - loss: 0.6937 - acc: 0.5000\n",
      "Epoch 255/500\n",
      "2/2 [==============================] - 0s 750us/step - loss: 0.6937 - acc: 0.5000\n",
      "Epoch 256/500\n",
      "2/2 [==============================] - 0s 721us/step - loss: 0.6936 - acc: 0.5000\n",
      "Epoch 257/500\n",
      "2/2 [==============================] - 0s 696us/step - loss: 0.6935 - acc: 0.5000\n",
      "Epoch 258/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6934 - acc: 0.5000\n",
      "Epoch 259/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6934 - acc: 0.5000\n",
      "Epoch 260/500\n",
      "2/2 [==============================] - 0s 737us/step - loss: 0.6933 - acc: 0.5000\n",
      "Epoch 261/500\n",
      "2/2 [==============================] - 0s 664us/step - loss: 0.6932 - acc: 0.5000\n",
      "Epoch 262/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6931 - acc: 0.5000\n",
      "Epoch 263/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6931 - acc: 0.5000\n",
      "Epoch 264/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6930 - acc: 0.5000\n",
      "Epoch 265/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6929 - acc: 0.5000\n",
      "Epoch 266/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6928 - acc: 0.5000\n",
      "Epoch 267/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6927 - acc: 0.5000\n",
      "Epoch 268/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6926 - acc: 0.5000\n",
      "Epoch 269/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6926 - acc: 0.5000\n",
      "Epoch 270/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6925 - acc: 0.5000\n",
      "Epoch 271/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6924 - acc: 0.5000\n",
      "Epoch 272/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6923 - acc: 0.5000\n",
      "Epoch 273/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6922 - acc: 0.5000\n",
      "Epoch 274/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6921 - acc: 0.5000\n",
      "Epoch 275/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6921 - acc: 0.5000\n",
      "Epoch 276/500\n",
      "2/2 [==============================] - 0s 2ms/step - loss: 0.6920 - acc: 0.5000\n",
      "Epoch 277/500\n",
      "2/2 [==============================] - 0s 700us/step - loss: 0.6919 - acc: 0.5000\n",
      "Epoch 278/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6918 - acc: 0.5000\n",
      "Epoch 279/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6917 - acc: 0.5000\n",
      "Epoch 280/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6916 - acc: 0.5000\n",
      "Epoch 281/500\n",
      "2/2 [==============================] - 0s 703us/step - loss: 0.6915 - acc: 0.5000\n",
      "Epoch 282/500\n",
      "2/2 [==============================] - 0s 2ms/step - loss: 0.6914 - acc: 0.5000\n",
      "Epoch 283/500\n",
      "2/2 [==============================] - 0s 700us/step - loss: 0.6913 - acc: 0.5000\n",
      "Epoch 284/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6912 - acc: 0.5000\n",
      "Epoch 285/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6912 - acc: 0.5000\n",
      "Epoch 286/500\n",
      "2/2 [==============================] - 0s 2ms/step - loss: 0.6911 - acc: 0.5000\n",
      "Epoch 287/500\n",
      "2/2 [==============================] - 0s 762us/step - loss: 0.6910 - acc: 0.5000\n",
      "Epoch 288/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6909 - acc: 0.5000\n",
      "Epoch 289/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6908 - acc: 0.5000\n",
      "Epoch 290/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6907 - acc: 0.5000\n",
      "Epoch 291/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6906 - acc: 0.5000\n",
      "Epoch 292/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6905 - acc: 0.5000\n",
      "Epoch 293/500\n",
      "2/2 [==============================] - 0s 680us/step - loss: 0.6904 - acc: 0.5000\n",
      "Epoch 294/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6903 - acc: 0.5000\n",
      "Epoch 295/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6902 - acc: 0.5000\n",
      "Epoch 296/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6901 - acc: 0.5000\n",
      "Epoch 297/500\n",
      "2/2 [==============================] - 0s 710us/step - loss: 0.6900 - acc: 0.5000\n",
      "Epoch 298/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6899 - acc: 0.5000\n",
      "Epoch 299/500\n",
      "2/2 [==============================] - 0s 731us/step - loss: 0.6898 - acc: 0.5000\n",
      "Epoch 300/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6896 - acc: 0.5000\n",
      "Epoch 301/500\n",
      "2/2 [==============================] - 0s 675us/step - loss: 0.6895 - acc: 0.5000\n",
      "Epoch 302/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6894 - acc: 0.5000\n",
      "Epoch 303/500\n",
      "2/2 [==============================] - 0s 835us/step - loss: 0.6893 - acc: 0.5000\n",
      "Epoch 304/500\n",
      "2/2 [==============================] - 0s 702us/step - loss: 0.6892 - acc: 0.5000\n",
      "Epoch 305/500\n",
      "2/2 [==============================] - 0s 734us/step - loss: 0.6891 - acc: 0.5000\n",
      "Epoch 306/500\n",
      "2/2 [==============================] - 0s 716us/step - loss: 0.6890 - acc: 0.5000\n",
      "Epoch 307/500\n",
      "2/2 [==============================] - 0s 762us/step - loss: 0.6889 - acc: 0.5000\n",
      "Epoch 308/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6888 - acc: 0.5000\n",
      "Epoch 309/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6886 - acc: 0.5000\n",
      "Epoch 310/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6885 - acc: 0.5000\n",
      "Epoch 311/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6884 - acc: 0.5000\n",
      "Epoch 312/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6883 - acc: 0.5000\n",
      "Epoch 313/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6882 - acc: 0.5000\n",
      "Epoch 314/500\n",
      "2/2 [==============================] - 0s 731us/step - loss: 0.6881 - acc: 0.5000\n",
      "Epoch 315/500\n",
      "2/2 [==============================] - 0s 692us/step - loss: 0.6879 - acc: 0.5000\n",
      "Epoch 316/500\n",
      "2/2 [==============================] - 0s 726us/step - loss: 0.6878 - acc: 0.5000\n",
      "Epoch 317/500\n",
      "2/2 [==============================] - 0s 786us/step - loss: 0.6877 - acc: 0.5000\n",
      "Epoch 318/500\n",
      "2/2 [==============================] - 0s 691us/step - loss: 0.6876 - acc: 0.5000\n",
      "Epoch 319/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6874 - acc: 0.5000\n",
      "Epoch 320/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6873 - acc: 0.5000\n",
      "Epoch 321/500\n",
      "2/2 [==============================] - 0s 761us/step - loss: 0.6872 - acc: 0.5000\n",
      "Epoch 322/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6871 - acc: 0.5000\n",
      "Epoch 323/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6869 - acc: 0.5000\n",
      "Epoch 324/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6868 - acc: 0.5000\n",
      "Epoch 325/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6867 - acc: 0.5000\n",
      "Epoch 326/500\n",
      "2/2 [==============================] - 0s 741us/step - loss: 0.6865 - acc: 0.5000\n",
      "Epoch 327/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6864 - acc: 0.5000\n",
      "Epoch 328/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6863 - acc: 0.5000\n",
      "Epoch 329/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6861 - acc: 0.5000\n",
      "Epoch 330/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6860 - acc: 0.5000\n",
      "Epoch 331/500\n",
      "2/2 [==============================] - 0s 2ms/step - loss: 0.6859 - acc: 0.5000\n",
      "Epoch 332/500\n",
      "2/2 [==============================] - 0s 691us/step - loss: 0.6857 - acc: 0.5000\n",
      "Epoch 333/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6856 - acc: 0.5000\n",
      "Epoch 334/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6854 - acc: 0.5000\n",
      "Epoch 335/500\n",
      "2/2 [==============================] - 0s 2ms/step - loss: 0.6853 - acc: 0.5000\n",
      "Epoch 336/500\n",
      "2/2 [==============================] - 0s 682us/step - loss: 0.6852 - acc: 0.5000\n",
      "Epoch 337/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6850 - acc: 0.5000\n",
      "Epoch 338/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6849 - acc: 0.5000\n",
      "Epoch 339/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6847 - acc: 0.5000\n",
      "Epoch 340/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6846 - acc: 0.5000\n",
      "Epoch 341/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6844 - acc: 0.5000\n",
      "Epoch 342/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6843 - acc: 0.5000\n",
      "Epoch 343/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6841 - acc: 0.5000\n",
      "Epoch 344/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6840 - acc: 0.5000\n",
      "Epoch 345/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6838 - acc: 0.5000\n",
      "Epoch 346/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6836 - acc: 0.5000\n",
      "Epoch 347/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6835 - acc: 0.5000\n",
      "Epoch 348/500\n",
      "2/2 [==============================] - 0s 2ms/step - loss: 0.6833 - acc: 0.5000\n",
      "Epoch 349/500\n",
      "2/2 [==============================] - 0s 691us/step - loss: 0.6832 - acc: 0.5000\n",
      "Epoch 350/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6830 - acc: 0.5000\n",
      "Epoch 351/500\n",
      "2/2 [==============================] - 0s 632us/step - loss: 0.6828 - acc: 0.5000\n",
      "Epoch 352/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6827 - acc: 0.5000\n",
      "Epoch 353/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6825 - acc: 0.5000\n",
      "Epoch 354/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6823 - acc: 0.5000\n",
      "Epoch 355/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6822 - acc: 0.5000\n",
      "Epoch 356/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6820 - acc: 0.5000\n",
      "Epoch 357/500\n",
      "2/2 [==============================] - 0s 722us/step - loss: 0.6818 - acc: 0.5000\n",
      "Epoch 358/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6817 - acc: 0.5000\n",
      "Epoch 359/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6815 - acc: 0.5000\n",
      "Epoch 360/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6813 - acc: 0.5000\n",
      "Epoch 361/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6811 - acc: 0.5000\n",
      "Epoch 362/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6809 - acc: 0.5000\n",
      "Epoch 363/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6808 - acc: 0.5000\n",
      "Epoch 364/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6806 - acc: 0.5000\n",
      "Epoch 365/500\n",
      "2/2 [==============================] - 0s 785us/step - loss: 0.6804 - acc: 0.5000\n",
      "Epoch 366/500\n",
      "2/2 [==============================] - 0s 703us/step - loss: 0.6802 - acc: 0.5000\n",
      "Epoch 367/500\n",
      "2/2 [==============================] - 0s 711us/step - loss: 0.6800 - acc: 0.5000\n",
      "Epoch 368/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6798 - acc: 0.5000\n",
      "Epoch 369/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6797 - acc: 0.5000\n",
      "Epoch 370/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6795 - acc: 0.5000\n",
      "Epoch 371/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6793 - acc: 0.5000\n",
      "Epoch 372/500\n",
      "2/2 [==============================] - 0s 657us/step - loss: 0.6791 - acc: 0.5000\n",
      "Epoch 373/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6789 - acc: 0.5000\n",
      "Epoch 374/500\n",
      "2/2 [==============================] - 0s 641us/step - loss: 0.6787 - acc: 0.5000\n",
      "Epoch 375/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6785 - acc: 0.5000\n",
      "Epoch 376/500\n",
      "2/2 [==============================] - 0s 718us/step - loss: 0.6783 - acc: 0.5000\n",
      "Epoch 377/500\n",
      "2/2 [==============================] - 0s 680us/step - loss: 0.6781 - acc: 0.5000\n",
      "Epoch 378/500\n",
      "2/2 [==============================] - 0s 811us/step - loss: 0.6779 - acc: 0.5000\n",
      "Epoch 379/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6777 - acc: 0.5000\n",
      "Epoch 380/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6775 - acc: 0.5000\n",
      "Epoch 381/500\n",
      "2/2 [==============================] - 0s 743us/step - loss: 0.6773 - acc: 0.5000\n",
      "Epoch 382/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6771 - acc: 0.5000\n",
      "Epoch 383/500\n",
      "2/2 [==============================] - 0s 747us/step - loss: 0.6769 - acc: 0.5000\n",
      "Epoch 384/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6767 - acc: 0.5000\n",
      "Epoch 385/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6764 - acc: 0.5000\n",
      "Epoch 386/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6762 - acc: 0.5000\n",
      "Epoch 387/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6760 - acc: 0.5000\n",
      "Epoch 388/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6758 - acc: 0.5000\n",
      "Epoch 389/500\n",
      "2/2 [==============================] - 0s 828us/step - loss: 0.6756 - acc: 0.5000\n",
      "Epoch 390/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6754 - acc: 0.5000\n",
      "Epoch 391/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6751 - acc: 0.5000\n",
      "Epoch 392/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6749 - acc: 0.5000\n",
      "Epoch 393/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6747 - acc: 0.5000\n",
      "Epoch 394/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6745 - acc: 0.5000\n",
      "Epoch 395/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6743 - acc: 0.5000\n",
      "Epoch 396/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6740 - acc: 0.5000\n",
      "Epoch 397/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6738 - acc: 0.5000\n",
      "Epoch 398/500\n",
      "2/2 [==============================] - 0s 648us/step - loss: 0.6736 - acc: 0.5000\n",
      "Epoch 399/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6733 - acc: 0.5000\n",
      "Epoch 400/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6731 - acc: 0.5000\n",
      "Epoch 401/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6729 - acc: 0.5000\n",
      "Epoch 402/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6726 - acc: 0.5000\n",
      "Epoch 403/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6724 - acc: 0.5000\n",
      "Epoch 404/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6722 - acc: 0.5000\n",
      "Epoch 405/500\n",
      "2/2 [==============================] - 0s 644us/step - loss: 0.6719 - acc: 0.5000\n",
      "Epoch 406/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6717 - acc: 0.5000\n",
      "Epoch 407/500\n",
      "2/2 [==============================] - 0s 2ms/step - loss: 0.6715 - acc: 0.5000\n",
      "Epoch 408/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6712 - acc: 0.5000\n",
      "Epoch 409/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6710 - acc: 0.5000\n",
      "Epoch 410/500\n",
      "2/2 [==============================] - 0s 983us/step - loss: 0.6707 - acc: 0.5000\n",
      "Epoch 411/500\n",
      "2/2 [==============================] - 0s 2ms/step - loss: 0.6705 - acc: 0.5000\n",
      "Epoch 412/500\n",
      "2/2 [==============================] - 0s 630us/step - loss: 0.6702 - acc: 0.5000\n",
      "Epoch 413/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6700 - acc: 0.5000\n",
      "Epoch 414/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6697 - acc: 0.5000\n",
      "Epoch 415/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6695 - acc: 0.5000\n",
      "Epoch 416/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6692 - acc: 0.5000\n",
      "Epoch 417/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6690 - acc: 1.0000\n",
      "Epoch 418/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6687 - acc: 1.0000\n",
      "Epoch 419/500\n",
      "2/2 [==============================] - 0s 710us/step - loss: 0.6685 - acc: 1.0000\n",
      "Epoch 420/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6682 - acc: 1.0000\n",
      "Epoch 421/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6680 - acc: 1.0000\n",
      "Epoch 422/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6677 - acc: 1.0000\n",
      "Epoch 423/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6675 - acc: 1.0000\n",
      "Epoch 424/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6672 - acc: 1.0000\n",
      "Epoch 425/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6670 - acc: 1.0000\n",
      "Epoch 426/500\n",
      "2/2 [==============================] - 0s 773us/step - loss: 0.6667 - acc: 1.0000\n",
      "Epoch 427/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6664 - acc: 1.0000\n",
      "Epoch 428/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6662 - acc: 1.0000\n",
      "Epoch 429/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6659 - acc: 1.0000\n",
      "Epoch 430/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6656 - acc: 1.0000\n",
      "Epoch 431/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6654 - acc: 1.0000\n",
      "Epoch 432/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6651 - acc: 1.0000\n",
      "Epoch 433/500\n",
      "2/2 [==============================] - 0s 2ms/step - loss: 0.6649 - acc: 1.0000\n",
      "Epoch 434/500\n",
      "2/2 [==============================] - 0s 652us/step - loss: 0.6646 - acc: 1.0000\n",
      "Epoch 435/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6643 - acc: 1.0000\n",
      "Epoch 436/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6641 - acc: 1.0000\n",
      "Epoch 437/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6638 - acc: 1.0000\n",
      "Epoch 438/500\n",
      "2/2 [==============================] - 0s 722us/step - loss: 0.6635 - acc: 1.0000\n",
      "Epoch 439/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6633 - acc: 1.0000\n",
      "Epoch 440/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6630 - acc: 1.0000\n",
      "Epoch 441/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6627 - acc: 1.0000\n",
      "Epoch 442/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6624 - acc: 1.0000\n",
      "Epoch 443/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6622 - acc: 1.0000\n",
      "Epoch 444/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6619 - acc: 1.0000\n",
      "Epoch 445/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6616 - acc: 1.0000\n",
      "Epoch 446/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6613 - acc: 1.0000\n",
      "Epoch 447/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6611 - acc: 1.0000\n",
      "Epoch 448/500\n",
      "2/2 [==============================] - 0s 711us/step - loss: 0.6608 - acc: 1.0000\n",
      "Epoch 449/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6605 - acc: 1.0000\n",
      "Epoch 450/500\n",
      "2/2 [==============================] - 0s 2ms/step - loss: 0.6602 - acc: 1.0000\n",
      "Epoch 451/500\n",
      "2/2 [==============================] - 0s 649us/step - loss: 0.6600 - acc: 1.0000\n",
      "Epoch 452/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6597 - acc: 1.0000\n",
      "Epoch 453/500\n",
      "2/2 [==============================] - 0s 718us/step - loss: 0.6594 - acc: 1.0000\n",
      "Epoch 454/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6591 - acc: 1.0000\n",
      "Epoch 455/500\n",
      "2/2 [==============================] - 0s 690us/step - loss: 0.6588 - acc: 1.0000\n",
      "Epoch 456/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6586 - acc: 1.0000\n",
      "Epoch 457/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6583 - acc: 1.0000\n",
      "Epoch 458/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6580 - acc: 1.0000\n",
      "Epoch 459/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6577 - acc: 1.0000\n",
      "Epoch 460/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6574 - acc: 1.0000\n",
      "Epoch 461/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6571 - acc: 1.0000\n",
      "Epoch 462/500\n",
      "2/2 [==============================] - 0s 2ms/step - loss: 0.6569 - acc: 1.0000\n",
      "Epoch 463/500\n",
      "2/2 [==============================] - 0s 691us/step - loss: 0.6566 - acc: 1.0000\n",
      "Epoch 464/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6563 - acc: 1.0000\n",
      "Epoch 465/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6560 - acc: 1.0000\n",
      "Epoch 466/500\n",
      "2/2 [==============================] - 0s 715us/step - loss: 0.6557 - acc: 1.0000\n",
      "Epoch 467/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6554 - acc: 1.0000\n",
      "Epoch 468/500\n",
      "2/2 [==============================] - 0s 2ms/step - loss: 0.6551 - acc: 1.0000\n",
      "Epoch 469/500\n",
      "2/2 [==============================] - 0s 667us/step - loss: 0.6548 - acc: 1.0000\n",
      "Epoch 470/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6546 - acc: 1.0000\n",
      "Epoch 471/500\n",
      "2/2 [==============================] - 0s 2ms/step - loss: 0.6543 - acc: 1.0000\n",
      "Epoch 472/500\n",
      "2/2 [==============================] - 0s 712us/step - loss: 0.6540 - acc: 1.0000\n",
      "Epoch 473/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6537 - acc: 1.0000\n",
      "Epoch 474/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6534 - acc: 1.0000\n",
      "Epoch 475/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6531 - acc: 1.0000\n",
      "Epoch 476/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6528 - acc: 1.0000\n",
      "Epoch 477/500\n",
      "2/2 [==============================] - 0s 2ms/step - loss: 0.6525 - acc: 1.0000\n",
      "Epoch 478/500\n",
      "2/2 [==============================] - 0s 721us/step - loss: 0.6522 - acc: 1.0000\n",
      "Epoch 479/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6519 - acc: 1.0000\n",
      "Epoch 480/500\n",
      "2/2 [==============================] - 0s 2ms/step - loss: 0.6516 - acc: 1.0000\n",
      "Epoch 481/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6513 - acc: 1.0000\n",
      "Epoch 482/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6510 - acc: 1.0000\n",
      "Epoch 483/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6507 - acc: 1.0000\n",
      "Epoch 484/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6504 - acc: 1.0000\n",
      "Epoch 485/500\n",
      "2/2 [==============================] - 0s 731us/step - loss: 0.6501 - acc: 1.0000\n",
      "Epoch 486/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6498 - acc: 1.0000\n",
      "Epoch 487/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6495 - acc: 1.0000\n",
      "Epoch 488/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6492 - acc: 1.0000\n",
      "Epoch 489/500\n",
      "2/2 [==============================] - 0s 751us/step - loss: 0.6489 - acc: 1.0000\n",
      "Epoch 490/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6486 - acc: 1.0000\n",
      "Epoch 491/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6482 - acc: 1.0000\n",
      "Epoch 492/500\n",
      "2/2 [==============================] - 0s 700us/step - loss: 0.6479 - acc: 1.0000\n",
      "Epoch 493/500\n",
      "2/2 [==============================] - 0s 2ms/step - loss: 0.6476 - acc: 1.0000\n",
      "Epoch 494/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6473 - acc: 1.0000\n",
      "Epoch 495/500\n",
      "2/2 [==============================] - 0s 706us/step - loss: 0.6470 - acc: 1.0000\n",
      "Epoch 496/500\n",
      "2/2 [==============================] - 0s 713us/step - loss: 0.6467 - acc: 1.0000\n",
      "Epoch 497/500\n",
      "2/2 [==============================] - 0s 2ms/step - loss: 0.6464 - acc: 1.0000\n",
      "Epoch 498/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6460 - acc: 1.0000\n",
      "Epoch 499/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6457 - acc: 1.0000\n",
      "Epoch 500/500\n",
      "2/2 [==============================] - 0s 1ms/step - loss: 0.6454 - acc: 1.0000\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "<keras.callbacks.History at 0x7f6d6de05320>"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model.fit(padded_docs.reshape(2,2,1),np.array(labels).reshape(max_length,1),epochs=500)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 110,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<keras.layers.recurrent.LSTM at 0x7f56a17930b8>,\n",
       " <keras.layers.core.Dense at 0x7f56a1793128>]"
      ]
     },
     "execution_count": 110,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model.layers"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 111,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[{'class_name': 'LSTM',\n",
       "  'config': {'activation': 'tanh',\n",
       "   'activity_regularizer': None,\n",
       "   'batch_input_shape': (None, 2, 1),\n",
       "   'bias_constraint': None,\n",
       "   'bias_initializer': {'class_name': 'Zeros', 'config': {}},\n",
       "   'bias_regularizer': None,\n",
       "   'dropout': 0.0,\n",
       "   'dtype': 'float32',\n",
       "   'go_backwards': False,\n",
       "   'implementation': 1,\n",
       "   'kernel_constraint': None,\n",
       "   'kernel_initializer': {'class_name': 'VarianceScaling',\n",
       "    'config': {'distribution': 'uniform',\n",
       "     'mode': 'fan_avg',\n",
       "     'scale': 1.0,\n",
       "     'seed': None}},\n",
       "   'kernel_regularizer': None,\n",
       "   'name': 'lstm_10',\n",
       "   'recurrent_activation': 'sigmoid',\n",
       "   'recurrent_constraint': None,\n",
       "   'recurrent_dropout': 0.0,\n",
       "   'recurrent_initializer': {'class_name': 'Zeros', 'config': {}},\n",
       "   'recurrent_regularizer': None,\n",
       "   'return_sequences': False,\n",
       "   'return_state': False,\n",
       "   'stateful': False,\n",
       "   'trainable': True,\n",
       "   'unit_forget_bias': True,\n",
       "   'units': 1,\n",
       "   'unroll': True,\n",
       "   'use_bias': True}},\n",
       " {'class_name': 'Dense',\n",
       "  'config': {'activation': 'sigmoid',\n",
       "   'activity_regularizer': None,\n",
       "   'bias_constraint': None,\n",
       "   'bias_initializer': {'class_name': 'Zeros', 'config': {}},\n",
       "   'bias_regularizer': None,\n",
       "   'kernel_constraint': None,\n",
       "   'kernel_initializer': {'class_name': 'VarianceScaling',\n",
       "    'config': {'distribution': 'uniform',\n",
       "     'mode': 'fan_avg',\n",
       "     'scale': 1.0,\n",
       "     'seed': None}},\n",
       "   'kernel_regularizer': None,\n",
       "   'name': 'dense_10',\n",
       "   'trainable': True,\n",
       "   'units': 1,\n",
       "   'use_bias': True}}]"
      ]
     },
     "execution_count": 111,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model.get_config()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 112,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[array([[-0.32939184, -0.9811073 , -0.6059296 , -0.33957732]],\n",
       "       dtype=float32),\n",
       " array([[-0.04132899, -0.71698403,  0.55261445, -0.37336   ]],\n",
       "       dtype=float32),\n",
       " array([ 0.24954776,  1.6016548 , -0.4455776 ,  0.26094177], dtype=float32)]"
      ]
     },
     "execution_count": 112,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model.layers[0].get_weights()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 113,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<tf.Variable 'lstm_10/kernel:0' shape=(1, 4) dtype=float32_ref>,\n",
       " <tf.Variable 'lstm_10/recurrent_kernel:0' shape=(1, 4) dtype=float32_ref>,\n",
       " <tf.Variable 'lstm_10/bias:0' shape=(4,) dtype=float32_ref>]"
      ]
     },
     "execution_count": 113,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model.layers[0].trainable_weights"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 114,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[array([[1.7236937]], dtype=float32), array([0.24704114], dtype=float32)]"
      ]
     },
     "execution_count": 114,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model.layers[1].get_weights()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 118,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<tf.Variable 'dense_10/kernel:0' shape=(1, 1) dtype=float32_ref>,\n",
       " <tf.Variable 'dense_10/bias:0' shape=(1,) dtype=float32_ref>]"
      ]
     },
     "execution_count": 118,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model.layers[1].trainable_weights"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 115,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[[1],\n",
       "        [2]]], dtype=int32)"
      ]
     },
     "execution_count": 115,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "padded_docs[1].reshape(1,2,1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 117,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[0.47375038]], dtype=float32)"
      ]
     },
     "execution_count": 117,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model.predict(padded_docs[1].reshape(1,2,1))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 158,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<keras.layers.recurrent.LSTM at 0x7f10442a4a20>]"
      ]
     },
     "execution_count": 158,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model.layers"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[array([[ 0.03574599,  0.03463735,  0.03284376,  0.02637372,  0.03980382,\n",
       "         -0.03907117, -0.02789926, -0.00358451],\n",
       "        [ 0.03421954,  0.04351522,  0.00589408, -0.04832727, -0.00828198,\n",
       "         -0.04772505,  0.00875548, -0.01536892],\n",
       "        [ 0.04898155,  0.01730723, -0.02951646,  0.02846657,  0.01706989,\n",
       "          0.03087733, -0.00581173, -0.03555614],\n",
       "        [ 0.03407046,  0.03600022, -0.03234861,  0.03110384, -0.0099007 ,\n",
       "          0.01107918,  0.00615746, -0.03383043],\n",
       "        [ 0.00602891,  0.00023402,  0.02693779, -0.02934064, -0.04537648,\n",
       "         -0.0072022 , -0.02867633,  0.00901375],\n",
       "        [-0.01281931,  0.01679485,  0.04794529,  0.03495849, -0.04389096,\n",
       "          0.00275611,  0.02929867,  0.01125343],\n",
       "        [ 0.00855082, -0.03869943,  0.00248744, -0.00599202,  0.03802994,\n",
       "          0.04899568, -0.04703009, -0.0290049 ],\n",
       "        [ 0.03235635, -0.01593938, -0.0316224 , -0.047445  , -0.01225562,\n",
       "         -0.02097278, -0.01437372, -0.00120188],\n",
       "        [ 0.02778373,  0.02809546, -0.03769414,  0.04161526,  0.00605833,\n",
       "         -0.04995874, -0.04996941,  0.02268493],\n",
       "        [-0.021586  , -0.03029481, -0.01963915, -0.01198354, -0.00863718,\n",
       "          0.04777403, -0.03534312, -0.03536449],\n",
       "        [-0.01226651,  0.04491884,  0.04970994,  0.019878  ,  0.01581964,\n",
       "          0.01126244,  0.00528388, -0.0339433 ],\n",
       "        [ 0.0441509 , -0.04591445,  0.02699542,  0.04682713,  0.04857886,\n",
       "         -0.04933016,  0.00097854, -0.02298677],\n",
       "        [-0.02516615,  0.02831649, -0.04665245,  0.04125141,  0.03114888,\n",
       "         -0.03472952,  0.02707447, -0.04552441],\n",
       "        [-0.02660489, -0.04225105,  0.0341599 , -0.04336375,  0.04355576,\n",
       "          0.01776204,  0.03818815, -0.04095025],\n",
       "        [-0.00188073, -0.00255921,  0.00948051,  0.01447983,  0.02038225,\n",
       "         -0.02824913,  0.00092629, -0.03106133],\n",
       "        [ 0.01627261, -0.03556401,  0.03341034, -0.03977319, -0.02095376,\n",
       "          0.02388285,  0.03608564,  0.02771498],\n",
       "        [-0.04577917,  0.02282861, -0.01095625,  0.01301983,  0.01171762,\n",
       "         -0.00032227, -0.0264714 ,  0.00945022],\n",
       "        [-0.02473453,  0.04120375, -0.03129055,  0.01312708,  0.01965717,\n",
       "         -0.0473392 ,  0.01736398, -0.03031   ],\n",
       "        [ 0.00437496, -0.03904324,  0.03825623, -0.0241079 , -0.01293124,\n",
       "          0.03489029,  0.0217789 ,  0.02268654],\n",
       "        [-0.02976381,  0.01467415, -0.03847577,  0.01101127,  0.01718039,\n",
       "          0.01152027, -0.00660403,  0.04847386],\n",
       "        [ 0.03183034, -0.01938827,  0.04131469,  0.04549142,  0.02312969,\n",
       "         -0.01425881, -0.01411869, -0.02133976],\n",
       "        [ 0.00064483, -0.02991569,  0.00585955,  0.01956379, -0.00242565,\n",
       "          0.04581738, -0.03899345, -0.00476704],\n",
       "        [ 0.00528844,  0.01534191,  0.00471107,  0.00351102, -0.02326088,\n",
       "          0.00482456, -0.04229848, -0.04095989],\n",
       "        [-0.03546915, -0.04092003, -0.02524695,  0.00597502, -0.01295304,\n",
       "         -0.00133582,  0.00131168, -0.0023579 ],\n",
       "        [-0.0032695 ,  0.02329353,  0.01710725,  0.0440105 ,  0.02560365,\n",
       "         -0.0129542 ,  0.0159606 , -0.03553113],\n",
       "        [ 0.04914353,  0.04968245, -0.03835959, -0.01936479, -0.00788488,\n",
       "          0.00050948,  0.00019795, -0.01385526],\n",
       "        [-0.00484372, -0.02495637,  0.02985977,  0.04474591,  0.03054163,\n",
       "          0.01938326, -0.03198909,  0.03629578],\n",
       "        [-0.04401785,  0.03737258,  0.00424936, -0.01448584,  0.03303876,\n",
       "          0.00176572, -0.0407909 ,  0.03592869],\n",
       "        [ 0.03613717,  0.0428559 , -0.00504121,  0.0261183 , -0.03035703,\n",
       "          0.01644383, -0.04343793, -0.03041507],\n",
       "        [-0.01102211, -0.03800501,  0.03877546,  0.01242952,  0.00085651,\n",
       "         -0.01349106,  0.03182653,  0.03169444],\n",
       "        [ 0.04639696, -0.03056166,  0.03178075, -0.0003695 , -0.04255611,\n",
       "         -0.03362781, -0.02514125, -0.01273168],\n",
       "        [ 0.03039375, -0.02863237,  0.0093485 , -0.03209858, -0.00719361,\n",
       "         -0.01802226, -0.04132587,  0.02329919],\n",
       "        [ 0.00816428, -0.04172903, -0.00463853,  0.02631894, -0.01535911,\n",
       "         -0.04469481, -0.0190395 ,  0.00083724],\n",
       "        [-0.04848135, -0.02264792,  0.00931591,  0.00759568, -0.01869681,\n",
       "         -0.0198444 ,  0.00774048, -0.03505745],\n",
       "        [-0.04508432,  0.00640761, -0.00817264,  0.0250584 , -0.02054258,\n",
       "         -0.00539143,  0.03174612,  0.01020169],\n",
       "        [ 0.01624856,  0.04277674,  0.00859565,  0.00458036, -0.0491404 ,\n",
       "         -0.0108365 , -0.03046472,  0.00232519],\n",
       "        [ 0.01742572, -0.03233963, -0.03843109, -0.03393432, -0.02441312,\n",
       "         -0.00557439,  0.02168398,  0.03525479],\n",
       "        [-0.04261712, -0.04211324,  0.04939565, -0.02963909,  0.03522258,\n",
       "          0.02457793, -0.02519996, -0.01331631],\n",
       "        [-0.01045644,  0.03481753, -0.01860303, -0.00837258,  0.01841917,\n",
       "         -0.04744111,  0.04698339,  0.00298374],\n",
       "        [ 0.03425204,  0.04373714, -0.04695588, -0.03721653,  0.01796622,\n",
       "         -0.0451232 ,  0.02185493, -0.02143764],\n",
       "        [-0.02549158, -0.04821725, -0.01000497,  0.0465801 , -0.03121613,\n",
       "          0.0104766 , -0.01434121, -0.02130864],\n",
       "        [ 0.03870562, -0.047392  ,  0.03386498, -0.02483016,  0.02567684,\n",
       "         -0.00949658,  0.04608229, -0.01164786],\n",
       "        [-0.04234364, -0.02923813,  0.0430262 ,  0.04872883,  0.02835023,\n",
       "          0.04424191,  0.03965678,  0.01079237],\n",
       "        [-0.00808144,  0.0173818 , -0.04890602, -0.02027659, -0.02152518,\n",
       "          0.02112073, -0.0489274 ,  0.011645  ],\n",
       "        [-0.03103837, -0.01042563, -0.04364024, -0.01037116, -0.04597859,\n",
       "         -0.00307251,  0.04234064, -0.01155393],\n",
       "        [ 0.0391309 ,  0.04486344,  0.03347068, -0.02821328,  0.0180927 ,\n",
       "          0.00045388,  0.02363032,  0.02420816],\n",
       "        [-0.00887729, -0.01812911, -0.02088953,  0.01410158, -0.02434357,\n",
       "          0.00127926,  0.04303359, -0.02344087],\n",
       "        [-0.00617609,  0.01493117,  0.01138834, -0.04081681,  0.00239972,\n",
       "          0.03710924,  0.04651071,  0.04945605],\n",
       "        [-0.03899466, -0.01366857,  0.04142748, -0.04626512, -0.04860364,\n",
       "          0.03755999,  0.03412284, -0.03832417],\n",
       "        [-0.02989405, -0.01410637, -0.0457713 , -0.0054497 , -0.00138718,\n",
       "         -0.0051474 , -0.0136429 ,  0.03341982]], dtype=float32)]"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model.layers[0].get_weights()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "kernelspec": {
   "display_name": "Python [Root]",
   "language": "python",
   "name": "Python [Root]"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
